home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / winuser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  98.6 KB  |  4,620 lines

  1. /*
  2.  
  3. Copyright (c) 1985-1998, Microsoft Corporation
  4.  
  5. Module Name: winuser.h
  6.  
  7. --*/
  8. //    @doc BOTH EXTERNAL CEUSER
  9.  
  10. #ifndef _WINUSER_
  11. #define _WINUSER_
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. #include <windef.h>
  18. #include <mmsystem.h>
  19.  
  20.  
  21.  
  22. typedef struct tagMSG {
  23.     HWND        hwnd;
  24.     UINT        message;
  25.     WPARAM      wParam;
  26.     LPARAM      lParam;
  27.     DWORD       time;
  28.     POINT       pt;
  29. } MSG, *PMSG, *NPMSG, *LPMSG;
  30.  
  31. #ifndef NORESOURCE
  32.  
  33. #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
  34. #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
  35. #ifdef UNICODE
  36. #define MAKEINTRESOURCE  MAKEINTRESOURCEW
  37. #else
  38. #define MAKEINTRESOURCE  MAKEINTRESOURCEA
  39. #endif // !UNICODE
  40.  
  41. /*
  42.  * Predefined Resource Types
  43.  */
  44. #define RT_CURSOR           MAKEINTRESOURCE(1)
  45. #define RT_BITMAP           MAKEINTRESOURCE(2)
  46. #define RT_ICON             MAKEINTRESOURCE(3)
  47. #define RT_MENU             MAKEINTRESOURCE(4)
  48. #define RT_DIALOG           MAKEINTRESOURCE(5)
  49. #define RT_STRING           MAKEINTRESOURCE(6)
  50. #define RT_FONTDIR          MAKEINTRESOURCE(7)
  51. #define RT_FONT             MAKEINTRESOURCE(8)
  52. #define RT_ACCELERATOR      MAKEINTRESOURCE(9)
  53. #define RT_RCDATA           MAKEINTRESOURCE(10)
  54. #define RT_MESSAGETABLE     MAKEINTRESOURCE(11)
  55.  
  56. #define DIFFERENCE          11
  57. #define RT_GROUP_CURSOR     MAKEINTRESOURCE((DWORD)RT_CURSOR + DIFFERENCE)
  58. #define RT_GROUP_ICON       MAKEINTRESOURCE((DWORD)RT_ICON + DIFFERENCE)
  59. #define RT_VERSION          MAKEINTRESOURCE(16)
  60. #define RT_DLGINCLUDE       MAKEINTRESOURCE(17)
  61.  
  62. #endif /* !NORESOURCE */
  63.  
  64. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  65. // @CESYSGEN IF GWES_DLGMGR
  66. typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  67. // @CESYSGEN ENDIF
  68. // @CESYSGEN IF GWES_TIMER
  69. typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
  70. // @CESYSGEN ENDIF
  71.  
  72. /* WNDCLASS */
  73. typedef struct tagWNDCLASSA {
  74.     UINT        style;
  75.     WNDPROC     lpfnWndProc;
  76.     int         cbClsExtra;
  77.     int         cbWndExtra;
  78.     HINSTANCE   hInstance;
  79.     HICON       hIcon;
  80.     HCURSOR     hCursor;
  81.     HBRUSH      hbrBackground;
  82.     LPCSTR      lpszMenuName;
  83.     LPCSTR      lpszClassName;
  84. } WNDCLASSA, *PWNDCLASSA, *PWNDCLASSA, *LPWNDCLASSA;
  85.  
  86. typedef struct tagWNDCLASSW {
  87.     UINT        style;
  88.     WNDPROC     lpfnWndProc;
  89.     int         cbClsExtra;
  90.     int         cbWndExtra;
  91.     HINSTANCE   hInstance;
  92.     HICON       hIcon;
  93.     HCURSOR     hCursor;
  94.     HBRUSH      hbrBackground;
  95.     LPCWSTR     lpszMenuName;
  96.     LPCWSTR     lpszClassName;
  97. } WNDCLASSW, *PWNDCLASSW, *PWNDCLASSW, *LPWNDCLASSW;
  98.  
  99. #ifdef UNICODE
  100. typedef WNDCLASSW WNDCLASS;
  101. typedef PWNDCLASSW PWNDCLASS;
  102. typedef LPWNDCLASSW LPWNDCLASS;
  103. typedef PWNDCLASSW PWNDCLASS;
  104. #else
  105. typedef WNDCLASSA WNDCLASS;
  106. typedef PWNDCLASSA PWNDCLASS;
  107. typedef LPWNDCLASSA LPWNDCLASS;
  108. typedef PWNDCLASSA PWNDCLASS;
  109. #endif // UNICODE
  110.  
  111.  
  112. // @CESYSGEN IF GWES_WINMGR
  113.  
  114. #define HSHELL_WINDOWCREATED        1
  115. #define HSHELL_WINDOWDESTROYED      2
  116. #define HSHELL_WINDOWACTIVATED      4
  117. #define HSHELL_REDRAW               6
  118. #define HSHELL_TASKMAN              7
  119. #define HSHELL_CAPSLOCK                8
  120.  
  121. // @CESYSGEN ENDIF
  122.  
  123.  
  124. #define POINTSTOPOINT(pt, pts)                          \
  125.         { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts);   \
  126.           (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
  127.  
  128. #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
  129.  
  130. // @CESYSGEN IF GWES_WINMGR
  131. #define MAKEWPARAM(l, h)      (WPARAM)MAKELONG(l, h)
  132. #define MAKELPARAM(l, h)      (LPARAM)MAKELONG(l, h)
  133. #define MAKELRESULT(l, h)     (LRESULT)MAKELONG(l, h)
  134.  
  135.  
  136. /*
  137.  * Window Messages
  138.  */
  139.  
  140. #define WM_MOVE                         0x0003
  141. #define WM_SIZE                         0x0005
  142.  
  143. // @CESYSGEN ENDIF
  144.  
  145. // @CESYSGEN IF GWES_WMBASE
  146. // @CESYSGEN IF GWES_FOREGND
  147. #define WM_ACTIVATE                     0x0006
  148. /*
  149.  * WM_ACTIVATE state values
  150.  */
  151. #define     WA_INACTIVE     0
  152. #define     WA_ACTIVE       1
  153. #define     WA_CLICKACTIVE  2
  154.  
  155. #define WM_SETFOCUS                     0x0007
  156. #define WM_KILLFOCUS                    0x0008
  157. // @CESYSGEN ENDIF
  158. // @CESYSGEN ENDIF
  159.  
  160. // @CESYSGEN IF GWES_WINMGR
  161.  
  162. #define WM_SETREDRAW                    0x000B
  163. #define WM_SETTEXT                      0x000C
  164. #define WM_GETTEXT                      0x000D
  165. #define WM_GETTEXTLENGTH                0x000E
  166. #define WM_PAINT                        0x000F
  167.  
  168. // @CESYSGEN ENDIF
  169.  
  170. // @CESYSGEN IF GWES_WINMGR
  171. #define WM_ERASEBKGND                   0x0014
  172. #define WM_SYSCOLORCHANGE               0x0015
  173. #define WM_SHOWWINDOW                   0x0018
  174. #define WM_WININICHANGE                 0x001A
  175. #if(WINVER >= 0x0400)
  176. #define WM_SETTINGCHANGE                WM_WININICHANGE
  177. #endif /* WINVER >= 0x0400 */
  178.  
  179. #define WM_FONTCHANGE                   0x001D
  180. #define WM_CANCELMODE                   0x001F
  181. // @CESYSGEN ENDIF
  182.  
  183. // @CESYSGEN IF GWES_CURSOR || GWES_MCURSOR
  184. #define WM_SETCURSOR                    0x0020
  185. // @CESYSGEN ENDIF
  186.  
  187. // @CESYSGEN IF GWES_DLGMGR
  188. #define WM_NEXTDLGCTL                   0x0028
  189. // @CESYSGEN ENDIF
  190.  
  191. // @CESYSGEN IF GWES_WINMGR
  192. #define WM_DRAWITEM                     0x002B
  193. #define WM_MEASUREITEM                  0x002C
  194. #define WM_DELETEITEM                   0x002D
  195. #define WM_SETFONT                      0x0030
  196. #define WM_GETFONT                      0x0031
  197. #define WM_COMPAREITEM                  0x0039
  198.  
  199. #define WM_WINDOWPOSCHANGED             0x0047
  200.  
  201. // @CESYSGEN ENDIF
  202.  
  203. // @CESYSGEN IF GWES_WINMGR
  204.  
  205.  
  206. #define WM_NOTIFY                       0x004E
  207. #define WM_HELP                         0x0053
  208.  
  209. #define WM_STYLECHANGED                 0x007D
  210. // @CESYSGEN ENDIF
  211.  
  212.  
  213. // @CESYSGEN IF GWES_DLGMGR
  214. #define WM_GETDLGCODE                   0x0087
  215. // @CESYSGEN ENDIF
  216.  
  217. // @CESYSGEN IF GWES_KBDUI
  218. #define WM_KEYFIRST                     0x0100
  219. #define WM_KEYDOWN                      0x0100
  220. #define WM_KEYUP                        0x0101
  221. #define WM_CHAR                         0x0102
  222. #define WM_DEADCHAR                     0x0103
  223. #define WM_SYSKEYDOWN                   0x0104
  224. #define WM_SYSKEYUP                     0x0105
  225. #define WM_SYSCHAR                      0x0106
  226. #define WM_SYSDEADCHAR                  0x0107
  227. #define WM_KEYLAST                      0x0108
  228.  
  229. #define WM_IM_INFO            0x010C
  230.  
  231. #define WM_IME_STARTCOMPOSITION            0x010D
  232. #define WM_IME_ENDCOMPOSITION            0x010E
  233. #define WM_IME_COMPOSITION                0x010F
  234. #define WM_IME_KEYLAST                    0x010F
  235.  
  236. #define WM_IME_SETCONTEXT                0x0281
  237. #define WM_IME_NOTIFY                    0x0282
  238. #define WM_IME_CONTROL                    0x0283
  239. #define WM_IME_COMPOSITIONFULL            0x0284
  240. #define WM_IME_SELECT                    0x0285
  241. #define WM_IME_CHAR                        0x0286
  242. #define WM_IME_SYSTEM                    0x0287
  243. #define WM_IME_REQUEST                  0x0288
  244. #define WM_IME_KEYDOWN                    0x0290
  245. #define WM_IME_KEYUP                    0x0291
  246.  
  247. // @CESYSGEN ENDIF
  248.  
  249. // @CESYSGEN IF GWES_DLGMGR
  250. #define WM_INITDIALOG                   0x0110
  251. // @CESYSGEN ENDIF
  252.  
  253.  
  254. // @CESYSGEN IF GWES_WINMGR
  255. #define WM_COMMAND                      0x0111
  256. #define WM_SYSCOMMAND                   0x0112
  257. // @CESYSGEN ENDIF
  258. // @CESYSGEN IF GWES_TIMER
  259. #define WM_TIMER                           0x0113
  260. // @CESYSGEN ENDIF
  261. // @CESYSGEN IF GWES_WINMGR
  262. #define WM_HSCROLL                      0x0114
  263. #define WM_VSCROLL                      0x0115
  264. // @CESYSGEN ENDIF
  265. // @CESYSGEN IF GWES_MENU
  266. #define WM_INITMENUPOPUP                0x0117
  267. #define WM_MENUCHAR                     0x0120
  268. // @CESYSGEN ENDIF
  269.  
  270. #define WM_MOUSEFIRST                   0x0200
  271. #define WM_MOUSEMOVE                    0x0200
  272. #define WM_LBUTTONDOWN                  0x0201
  273. #define WM_LBUTTONUP                    0x0202
  274. #define WM_LBUTTONDBLCLK                0x0203
  275. #define WM_RBUTTONDOWN                  0x0204
  276. #define WM_RBUTTONUP                    0x0205
  277. #define WM_RBUTTONDBLCLK                0x0206
  278. #define WM_MBUTTONDOWN                  0x0207
  279. #define WM_MBUTTONUP                    0x0208
  280. #define WM_MBUTTONDBLCLK                0x0209
  281. #define WM_MOUSELAST                    0x0209
  282.  
  283. #define WM_MOUSEWHEEL                   0x020A
  284. #undef WM_MOUSELAST
  285. #define WM_MOUSELAST                    0x020A
  286.  
  287. // @CESYSGEN IF GWES_MENU
  288. #define MENULOOP_WINDOW                 0
  289. #define MENULOOP_POPUP                  1
  290. #define WM_ENTERMENULOOP                0x0211
  291. #define WM_EXITMENULOOP                 0x0212
  292. // @CESYSGEN ENDIF
  293. #define WM_CAPTURECHANGED               0x0215
  294.  
  295. // @CESYSGEN IF GWES_CLIPBD
  296. #define WM_CUT                          0x0300
  297. #define WM_COPY                         0x0301
  298. #define WM_PASTE                        0x0302
  299. #define WM_CLEAR                        0x0303
  300. #define WM_UNDO                         0x0304
  301. #define WM_RENDERFORMAT                 0x0305
  302. #define WM_RENDERALLFORMATS             0x0306
  303. #define WM_DESTROYCLIPBOARD             0x0307
  304. // @CESYSGEN ENDIF
  305.  
  306. // @CESYSGEN IF GWES_PGDI || GWES_MGPAL
  307. #define WM_QUERYNEWPALETTE              0x030F
  308. #define WM_PALETTECHANGED               0x0311
  309. // @CESYSGEN ENDIF
  310.  
  311. // @CESYSGEN IF GWES_MSGBOX
  312. #define WM_CTLCOLORMSGBOX               0x0132
  313. // @CESYSGEN ENDIF
  314. // @CESYSGEN IF GWES_EDCTL
  315. #define WM_CTLCOLOREDIT                 0x0133
  316. // @CESYSGEN ENDIF
  317. // @CESYSGEN IF GWES_LBCTL
  318. #define WM_CTLCOLORLISTBOX              0x0134
  319. // @CESYSGEN ENDIF
  320. // @CESYSGEN IF GWES_BTNCTL
  321. #define WM_CTLCOLORBTN                  0x0135
  322. // @CESYSGEN ENDIF
  323. // @CESYSGEN IF GWES_DLGMGR
  324. #define WM_CTLCOLORDLG                  0x0136
  325. // @CESYSGEN ENDIF
  326. // @CESYSGEN IF GWES_SCBCTL
  327. #define WM_CTLCOLORSCROLLBAR            0x0137
  328. // @CESYSGEN ENDIF
  329. // @CESYSGEN IF GWES_STCCTL
  330. #define WM_CTLCOLORSTATIC               0x0138
  331. // @CESYSGEN ENDIF
  332. #define WM_VKEYTOITEM                   0x002E
  333. #define WM_CHARTOITEM                   0x002F
  334. #define WM_QUERYDRAGICON                0x0037
  335.  
  336. // New for WINCE
  337. #define WM_DBNOTIFICATION                0x03FD
  338. #define WM_NETCONNECT                   0x03FE
  339. #define WM_HIBERNATE                    0x03FF
  340.  
  341. #define WM_APP                          0x8000
  342.  
  343. /*
  344.  * NOTE: All Message Numbers below 0x0400 are RESERVED.
  345.  *
  346.  * Private Window Messages Start Here:
  347.  */
  348. #define WM_USER                         0x0400
  349.  
  350.  
  351. // @CESYSGEN IF GWES_WINMGR
  352. /*
  353.  * WM_SIZE message wParam values
  354.  */
  355. #define SIZE_RESTORED       0
  356. #define SIZE_MINIMIZED      1
  357. #define SIZE_MAXIMIZED      2
  358. #define SIZE_MAXSHOW        3
  359. #define SIZE_MAXHIDE        4
  360.  
  361. /*
  362.  * Window Styles
  363.  */
  364. #ifdef UNDER_NT
  365. #ifndef WS_THICKFRAME
  366. #define WS_THICKFRAME       0x00040000L
  367. #endif // WS_THICKFRAME
  368. #define WS_OVERLAPPED       0x00000000L
  369. #else
  370. // @CESYSGEN IF GWES_NCLIENT
  371. #define WS_OVERLAPPED       WS_BORDER | WS_CAPTION
  372. // @CESYSGEN ENDIF
  373. #endif // UNDER_NT
  374. #define WS_CLIPSIBLINGS     0x04000000L
  375. #define WS_CLIPCHILDREN     0x02000000L
  376. // @CESYSGEN IF GWES_NCLIENT
  377. #define WS_CAPTION          0x00C00000L     /* WS_BORDER | WS_DLGFRAME  */
  378. #define WS_BORDER           0x00800000L
  379. #define WS_DLGFRAME         0x00400000L
  380. #define WS_VSCROLL          0x00200000L
  381. #define WS_HSCROLL          0x00100000L
  382. #define WS_SYSMENU          0x00080000L
  383. #define WS_SIZEBOX            0x00040000L
  384. #define WS_MAXIMIZEBOX        0x00020000L
  385. #define WS_MINIMIZEBOX        0x00010000L
  386. // @CESYSGEN ENDIF
  387. #define WS_POPUP            0x80000000L
  388.  
  389.  
  390. /*
  391.  * Class styles
  392.  */
  393. #define CS_DBLCLKS          0x0008
  394. #define CS_GLOBALCLASS      0x4000
  395.  
  396. /*
  397.  * Extended Window Styles
  398.  */
  399. // @CESYSGEN IF GWES_NCLIENT
  400. #define WS_EX_DLGMODALFRAME     0x00000001L
  401. // @CESYSGEN ENDIF
  402. #define WS_EX_TOPMOST           0x00000008L
  403. #if(WINVER >= 0x0400)
  404. #define WS_EX_TOOLWINDOW        0x00000080L
  405. // @CESYSGEN IF GWES_NCLIENT
  406. #define WS_EX_WINDOWEDGE        0x00000100L
  407. #define WS_EX_CLIENTEDGE        0x00000200L
  408.  
  409. #define WS_EX_CONTEXTHELP        0x00000400L
  410. #define WS_EX_STATICEDGE        0x00020000L
  411. // @CESYSGEN ENDIF
  412.  
  413. // @CESYSGEN IF GWES_NCLIENT
  414. #define WS_EX_OVERLAPPEDWINDOW  (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  415.  
  416. #define WS_EX_CAPTIONOKBTN      0x80000000L
  417. #define WS_EX_NODRAG            0x40000000L
  418. // @CESYSGEN ENDIF
  419. #define WS_EX_ABOVESTARTUP        0x20000000L
  420. #define WS_EX_INK                0x10000000L
  421. #define WS_EX_NOANIMATION        0x04000000L
  422.  
  423. #endif /* WINVER >= 0x0400 */
  424.  
  425. /*
  426.  * Class styles
  427.  */
  428. #define CS_VREDRAW          0x0001
  429. #define CS_HREDRAW          0x0002
  430. #define CS_DBLCLKS          0x0008
  431. #define CS_PARENTDC         0x0080
  432. #define CS_NOCLOSE          0x0200
  433. #define CS_GLOBALCLASS      0x4000
  434. #define CS_IME              0x00010000
  435. // @CESYSGEN ENDIF GWES_WINMGR
  436.  
  437.  
  438. // @CESYSGEN IF GWES_NCLIENT
  439. /* flags for DrawFrameControl */
  440.  
  441. #define DFC_CAPTION             1
  442. #define DFC_SCROLL              3
  443. #define DFC_BUTTON              4
  444.  
  445. #define DFCS_CAPTIONCLOSE       0x0000
  446. #define DFCS_CAPTIONHELP        0x0004
  447. #define DFCS_CAPTIONOKBTN       0x0080
  448. #define DFCS_CAPTIONMIN         0x0020
  449. #define DFCS_CAPTIONMAX         0x0040
  450. #define DFCS_CAPTIONRESTORE     0x0800
  451.  
  452. #define DFCS_SCROLLUP           0x0000
  453. #define DFCS_SCROLLDOWN         0x0001
  454. #define DFCS_SCROLLLEFT         0x0002
  455. #define DFCS_SCROLLRIGHT        0x0003
  456. #define DFCS_SCROLLCOMBOBOX     0x0005
  457.  
  458. #define DFCS_BUTTONCHECK        0x0000
  459. #define DFCS_BUTTONRADIO        0x0004
  460. #define DFCS_BUTTON3STATE       0x0008
  461. #define DFCS_BUTTONPUSH         0x0010
  462.  
  463. #define DFCS_INACTIVE           0x0100
  464. #define DFCS_PUSHED             0x0200
  465. #define DFCS_CHECKED            0x0400
  466.  
  467. WINUSERAPI BOOL    WINAPI DrawFrameControl(HDC, LPRECT, UINT, UINT);
  468. // @CESYSGEN ENDIF GWES_NCLIENT
  469.  
  470.  
  471.  
  472. // @CESYSGEN IF GWES_CLIPBD
  473. /*
  474.  * Predefined Clipboard Formats
  475.  */
  476. #define CF_TEXT             1
  477. #define CF_BITMAP           2
  478. #define CF_SYLK             4
  479. #define CF_DIF              5
  480. #define CF_TIFF             6
  481. #define CF_OEMTEXT          7
  482. #define CF_DIB              8
  483. #define CF_PALETTE          9
  484. #define CF_PENDATA          10
  485. #define CF_RIFF             11
  486. #define CF_WAVE             12
  487. #define CF_UNICODETEXT      13
  488. // @CESYSGEN ENDIF
  489. /*
  490.     WM_WININICHANGE section paramater
  491. */
  492. #define INI_INTL            1            // Regional Setting changed
  493.  
  494.  
  495. /*
  496.  * WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  497.  */
  498. #define HTERROR             (-2)
  499. #define HTTRANSPARENT       (-1)
  500. #define HTNOWHERE           0
  501. #define HTCLIENT            1
  502. #define HTCAPTION           2
  503. #define HTSYSMENU           3
  504. #define HTGROWBOX           4
  505. #define HTSIZE              HTGROWBOX
  506. #define HTMENU              5
  507. #define HTHSCROLL           6
  508. #define HTVSCROLL           7
  509. #define HTMINBUTTON         8
  510. #define HTMAXBUTTON         9
  511. #define HTLEFT              10
  512. #define HTRIGHT             11
  513. #define HTTOP               12
  514. #define HTTOPLEFT           13
  515. #define HTTOPRIGHT          14
  516. #define HTBOTTOM            15
  517. #define HTBOTTOMLEFT        16
  518. #define HTBOTTOMRIGHT       17
  519. #define HTBORDER            18
  520. #define HTREDUCE            HTMINBUTTON
  521. #define HTZOOM              HTMAXBUTTON
  522. #define HTSIZEFIRST         HTLEFT
  523. #define HTSIZELAST          HTBOTTOMRIGHT
  524. #if(WINVER >= 0x0400)
  525. #define HTOBJECT            19
  526. #define HTCLOSE             20
  527. #define HTHELP              21
  528. #endif /* WINVER >= 0x0400 */
  529.  
  530. WINUSERAPI
  531. UINT
  532. WINAPI
  533. RegisterWindowMessageA(
  534.     LPCSTR lpString);
  535. WINUSERAPI
  536. UINT
  537. WINAPI
  538. RegisterWindowMessageW(
  539.     LPCWSTR lpString);
  540. #ifdef UNICODE
  541. #define RegisterWindowMessage  RegisterWindowMessageW
  542. #else
  543. #define RegisterWindowMessage  RegisterWindowMessageA
  544. #endif // !UNICODE
  545.  
  546.  
  547. typedef struct tagCREATESTRUCTA {
  548.     LPVOID      lpCreateParams;
  549.     HINSTANCE   hInstance;
  550.     HMENU       hMenu;
  551.     HWND        hwndParent;
  552.     int         cy;
  553.     int         cx;
  554.     int         y;
  555.     int         x;
  556.     LONG        style;
  557.     LPCSTR      lpszName;
  558.     LPCSTR      lpszClass;
  559.     DWORD       dwExStyle;
  560. } CREATESTRUCTA, *PCREATESTRUCTA, *LPCREATESTRUCTA;
  561.  
  562. typedef struct tagCREATESTRUCTW {
  563.     LPVOID      lpCreateParams;
  564.     HINSTANCE   hInstance;
  565.     HMENU       hMenu;
  566.     HWND        hwndParent;
  567.     int         cy;
  568.     int         cx;
  569.     int         y;
  570.     int         x;
  571.     LONG        style;
  572.     LPCWSTR     lpszName;
  573.     LPCWSTR     lpszClass;
  574.     DWORD       dwExStyle;
  575. } CREATESTRUCTW, *PCREATESTRUCTW, *LPCREATESTRUCTW;
  576.  
  577. #ifdef UNICODE
  578. typedef CREATESTRUCTW CREATESTRUCT;
  579. typedef LPCREATESTRUCTW LPCREATESTRUCT;
  580. typedef PCREATESTRUCTW LPCREATESTRUCT;
  581. #else
  582. typedef CREATESTRUCTA CREATESTRUCT;
  583. typedef LPCREATESTRUCTA LPCREATESTRUCT;
  584. typedef PCREATESTRUCTA LPCREATESTRUCT;
  585. #endif // UNICODE
  586.  
  587. // @CESYSGEN IF GWES_WINMGR
  588.  
  589. typedef struct tagSTYLESTRUCT
  590. {
  591.     DWORD   styleOld;
  592.     DWORD   styleNew;
  593. } STYLESTRUCT, * LPSTYLESTRUCT;
  594.  
  595. typedef void * HDWP;
  596.  
  597. /*
  598.  * WM_WINDOWPOSCHANGED struct pointed to by lParam
  599.  */
  600. typedef struct tagWINDOWPOS {
  601.     HWND    hwnd;
  602.     HWND    hwndInsertAfter;
  603.     int     x;
  604.     int     y;
  605.     int     cx;
  606.     int     cy;
  607.     UINT    flags;
  608. } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
  609. // @CESYSGEN ENDIF
  610.  
  611.  
  612.  
  613. #if(WINVER >= 0x0400)
  614. #define EW_RESTARTWINDOWS    0x0042L
  615. #define EW_REBOOTSYSTEM      0x0043L
  616. #define EW_EXITANDEXECAPP    0x0044L
  617. #endif /* WINVER >= 0x0400 */
  618.  
  619. #define EWX_LOGOFF   0
  620. #define EWX_SHUTDOWN 1
  621. #define EWX_REBOOT   2
  622. #define EWX_FORCE    4
  623. #define EWX_POWEROFF 8
  624.  
  625.  
  626. /* MESSAGES */
  627.  
  628. // @CESYSGEN IF GWES_MSGQUE
  629. /*
  630.  * Special HWND value for use with PostMessage() and SendMessage()
  631.  */
  632. #define HWND_BROADCAST  ((HWND)0xffff)
  633.  
  634. WINUSERAPI
  635. BOOL
  636. WINAPI
  637. PostMessageA(
  638.     HWND hWnd,
  639.     UINT Msg,
  640.     WPARAM wParam,
  641.     LPARAM lParam);
  642. WINUSERAPI
  643. BOOL
  644. WINAPI
  645. PostMessageW(
  646.     HWND hWnd,
  647.     UINT Msg,
  648.     WPARAM wParam,
  649.     LPARAM lParam);
  650. #ifdef UNICODE
  651. #define PostMessage  PostMessageW
  652. #else
  653. #define PostMessage  PostMessageA
  654. #endif // !UNICODE
  655.  
  656.  
  657.  
  658. WINUSERAPI
  659. BOOL
  660. WINAPI
  661. PostThreadMessageA(
  662.     DWORD idThread,
  663.     UINT Msg,
  664.     WPARAM wParam,
  665.     LPARAM lParam);
  666. WINUSERAPI
  667. BOOL
  668. WINAPI
  669. PostThreadMessageW(
  670.     DWORD idThread,
  671.     UINT Msg,
  672.     WPARAM wParam,
  673.     LPARAM lParam);
  674. #ifdef UNICODE
  675. #define PostThreadMessage  PostThreadMessageW
  676. #else
  677. #define PostThreadMessage  PostThreadMessageA
  678. #endif // !UNICODE
  679.  
  680. VOID
  681. WINAPI
  682. PostQuitMessage(
  683.     int     nExitCode
  684.     );
  685.  
  686.  
  687. WINUSERAPI
  688. LRESULT
  689. WINAPI
  690. SendMessageA(
  691.     HWND hWnd,
  692.     UINT Msg,
  693.     WPARAM wParam,
  694.     LPARAM lParam);
  695. WINUSERAPI
  696. LRESULT
  697. WINAPI
  698. SendMessageW(
  699.     HWND hWnd,
  700.     UINT Msg,
  701.     WPARAM wParam,
  702.     LPARAM lParam);
  703. #ifdef UNICODE
  704. #define SendMessage  SendMessageW
  705. #else
  706. #define SendMessage  SendMessageA
  707. #endif // !UNICODE
  708.  
  709.  
  710. WINUSERAPI
  711. BOOL
  712. WINAPI
  713. SendNotifyMessageA(
  714.     HWND hWnd,
  715.     UINT Msg,
  716.     WPARAM wParam,
  717.     LPARAM lParam);
  718. WINUSERAPI
  719. BOOL
  720. WINAPI
  721. SendNotifyMessageW(
  722.     HWND hWnd,
  723.     UINT Msg,
  724.     WPARAM wParam,
  725.     LPARAM lParam);
  726. #ifdef UNICODE
  727. #define SendNotifyMessage  SendNotifyMessageW
  728. #else
  729. #define SendNotifyMessage  SendNotifyMessageA
  730. #endif // !UNICODE
  731.  
  732.  
  733.  
  734. WINUSERAPI
  735. BOOL
  736. WINAPI
  737. GetMessageA(
  738.     LPMSG lpMsg,
  739.     HWND hWnd ,
  740.     UINT wMsgFilterMin,
  741.     UINT wMsgFilterMax);
  742. WINUSERAPI
  743. BOOL
  744. WINAPI
  745. GetMessageW(
  746.     LPMSG lpMsg,
  747.     HWND hWnd ,
  748.     UINT wMsgFilterMin,
  749.     UINT wMsgFilterMax);
  750. #ifdef UNICODE
  751. #define GetMessage  GetMessageW
  752. #else
  753. #define GetMessage  GetMessageA
  754. #endif // !UNICODE
  755.  
  756.  
  757.  
  758. WINUSERAPI
  759. BOOL
  760. WINAPI
  761. PeekMessageW(
  762.     PMSG pMsg,
  763.     HWND hWnd ,
  764.     UINT wMsgFilterMin,
  765.     UINT wMsgFilterMax,
  766.     UINT wRemoveMsg);
  767. WINUSERAPI
  768. BOOL
  769. WINAPI
  770. PeekMessageA(
  771.     PMSG pMsg,
  772.     HWND hWnd ,
  773.     UINT wMsgFilterMin,
  774.     UINT wMsgFilterMax,
  775.     UINT wRemoveMsg);
  776. #ifdef UNICODE
  777. #define PeekMessage  PeekMessageW
  778. #else
  779. #define PeekMessage  PeekMessageA
  780. #endif // !UNICODE
  781.  
  782. /*
  783.  * PeekMessage() Options
  784.  */
  785. #define PM_NOREMOVE         0x0000
  786. #define PM_REMOVE           0x0001
  787. #define PM_NOYIELD          0x0002
  788.  
  789.  
  790.  
  791. BOOL
  792. WINAPI
  793. TranslateMessage(
  794.     CONST MSG   *pMsg
  795.     );
  796.  
  797.  
  798. WINUSERAPI
  799. LONG
  800. WINAPI
  801. DispatchMessageA(
  802.     CONST MSG *lpMsg);
  803. WINUSERAPI
  804. LONG
  805. WINAPI
  806. DispatchMessageW(
  807.     CONST MSG *lpMsg);
  808. #ifdef UNICODE
  809. #define DispatchMessage  DispatchMessageW
  810. #else
  811. #define DispatchMessage  DispatchMessageA
  812. #endif // !UNICODE
  813.  
  814. DWORD
  815. WINAPI
  816. GetMessagePos(
  817.     VOID
  818.     );
  819.  
  820.  
  821. #define MSGSRC_UNKNOWN                0
  822. #define MSGSRC_SOFTWARE_POST         1
  823. #define MSGSRC_HARDWARE_KEYBOARD    2
  824.  
  825. UINT
  826. WINAPI
  827. GetMessageSource(
  828.     void
  829.     );
  830.  
  831. WINUSERAPI
  832. DWORD
  833. WINAPI
  834. MsgWaitForMultipleObjectsEx(
  835.     DWORD nCount,
  836.     LPHANDLE pHandles,
  837.     DWORD dwMilliseconds,
  838.     DWORD dwWakeMask,
  839.     DWORD dwFlags);
  840.  
  841. #define MWMO_INPUTAVAILABLE    0x0004
  842.  
  843. #ifdef UNDER_CE
  844. #define MsgWaitForMultipleObjects(cnt,hndl,wa,ms,wm)    \
  845.     MsgWaitForMultipleObjectsEx(cnt,hndl,ms,wm,0)
  846. #else
  847. WINUSERAPI
  848. DWORD
  849. WINAPI
  850. MsgWaitForMultipleObjects(
  851.     DWORD nCount,
  852.     LPHANDLE pHandles,
  853.     BOOL fWaitAll,
  854.     DWORD dwMilliseconds,
  855.     DWORD dwWakeMask);
  856. #endif
  857.  
  858.  
  859. /*
  860.  * Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  861.  */
  862. #define QS_KEY              0x0001
  863. #define QS_MOUSEMOVE        0x0002
  864. #define QS_MOUSEBUTTON      0x0004
  865. #define QS_POSTMESSAGE      0x0008
  866. #define QS_TIMER            0x0010
  867. #define QS_PAINT            0x0020
  868. #define QS_SENDMESSAGE      0x0040
  869.  
  870.  
  871.  
  872. #define QS_MOUSE           (QS_MOUSEMOVE     | \
  873.                             QS_MOUSEBUTTON)
  874.  
  875. #define QS_INPUT           (QS_MOUSE         | \
  876.                             QS_KEY)
  877.  
  878. #define QS_ALLEVENTS       (QS_INPUT         | \
  879.                             QS_POSTMESSAGE   | \
  880.                             QS_TIMER         | \
  881.                             QS_PAINT)
  882.  
  883. #define QS_ALLINPUT        (QS_INPUT         | \
  884.                             QS_POSTMESSAGE   | \
  885.                             QS_TIMER         | \
  886.                             QS_PAINT         | \
  887.                             QS_SENDMESSAGE)
  888.  
  889.  
  890.  
  891. // @CESYSGEN ENDIF
  892.  
  893. /* CAPTURE */
  894.  
  895.  
  896. // @CESYSGEN IF GWES_FOREGND
  897. HWND
  898. WINAPI
  899. GetCapture(
  900.     VOID);
  901.  
  902. HWND
  903. WINAPI
  904. SetCapture(
  905.     HWND hWnd);
  906.  
  907. BOOL
  908. WINAPI
  909. ReleaseCapture(
  910.     VOID);
  911. // @CESYSGEN ENDIF
  912.  
  913.  
  914. // @CESYSGEN IF GWES_WINMGR
  915. BOOL
  916. WINAPI
  917. MoveWindow(
  918.     HWND hWnd,
  919.     int X,
  920.     int Y,
  921.     int nWidth,
  922.     int nHeight,
  923.     BOOL bRepaint);
  924.  
  925. BOOL
  926. WINAPI
  927. SetWindowPos (
  928.     HWND hwnd,
  929.     HWND hwndInsertAfter,
  930.     int x,
  931.     int y,
  932.     int dx,
  933.     int dy,
  934.     UINT fuFlags
  935.     );
  936.  
  937. BOOL
  938. WINAPI
  939. GetWindowRect (
  940.     HWND hwnd,
  941.     LPRECT prc
  942.     );
  943.  
  944. int
  945. WINAPI
  946. GetWindowTextLengthA(
  947.     HWND hWnd);
  948.  
  949. int
  950. WINAPI
  951. GetWindowTextLengthW(
  952.     HWND hWnd);
  953. #ifdef UNICODE
  954. #define GetWindowTextLength  GetWindowTextLengthW
  955. #else
  956. #define GetWindowTextLength  GetWindowTextLengthA
  957. #endif
  958.  
  959. BOOL
  960. WINAPI
  961. GetClientRect (
  962.     HWND hwnd,
  963.     LPRECT prc
  964.     );
  965.  
  966. BOOL
  967. WINAPI
  968. AdjustWindowRectEx (
  969.     LPRECT prc,
  970.     DWORD  dwStyle,
  971.     BOOL   bMenu,
  972.     DWORD  dwExStyle
  973.     );
  974.  
  975. BOOL
  976. WINAPI
  977. ValidateRect(
  978.     HWND hWnd ,
  979.     CONST RECT *lpRect);
  980.  
  981. BOOL
  982. WINAPI
  983. InvalidateRect (
  984.     HWND hwnd,
  985.     LPCRECT prc,
  986.     BOOL fErase
  987.     );
  988.  
  989. HWND
  990. WINAPI
  991. GetWindow (
  992.     HWND hwnd,
  993.     UINT uCmd
  994.     );
  995.  
  996. BOOL
  997. WINAPI
  998. BringWindowToTop(
  999.     HWND hWnd);
  1000.  
  1001. HDWP WINAPI BeginDeferWindowPos(
  1002.     int nNumWindows);
  1003.  
  1004. HDWP WINAPI DeferWindowPos(    
  1005.    HDWP hWinPosInfo,
  1006.    HWND hWnd,
  1007.    HWND hWndInsertAfter,
  1008.    int x,
  1009.    int y,
  1010.    int cx,
  1011.    int cy,
  1012.    UINT uFlags
  1013.    );
  1014.  
  1015. BOOL WINAPI EndDeferWindowPos(
  1016.   HDWP hWinPosInfo
  1017.   );
  1018.  
  1019. /* Flags for SetWindowPos API */
  1020. #define HWND_TOP        ((HWND)0)
  1021. #define HWND_TOPMOST    ((HWND)-1)
  1022. #define HWND_NOTOPMOST    ((HWND)-2)
  1023. #define HWND_BOTTOM     ((HWND)1)
  1024.  
  1025. #define SWP_NOSIZE            0x0001
  1026. #define SWP_NOMOVE            0x0002
  1027. #define SWP_NOZORDER        0x0004
  1028. #define SWP_NOACTIVATE        0x0010
  1029. #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
  1030. #define SWP_SHOWWINDOW        0x0040
  1031. #define SWP_HIDEWINDOW        0x0080
  1032. #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
  1033.  
  1034. #define SWP_DRAWFRAME       SWP_FRAMECHANGED
  1035. #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
  1036.  
  1037.  
  1038. /* Flags for GetWindow() api */
  1039. #define GW_HWNDFIRST        0
  1040. #define GW_HWNDLAST         1
  1041. #define GW_HWNDNEXT         2
  1042. #define GW_HWNDPREV         3
  1043. #define GW_OWNER            4
  1044. #define GW_CHILD            5
  1045. #define GW_MAX              5
  1046.  
  1047.  
  1048. int
  1049. WINAPI
  1050. ScrollWindowEx(
  1051.     HWND hWnd,
  1052.     int dx,
  1053.     int dy,
  1054.     CONST RECT *prcScroll,
  1055.     CONST RECT *prcClip ,
  1056.     HRGN hrgnUpdate,
  1057.     LPRECT prcUpdate,
  1058.     UINT flags);
  1059.  
  1060. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  1061. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  1062. // @CESYSGEN ENDIF
  1063.  
  1064.  
  1065. // @CESYSGEN IF GWES_PGDI || GWES_MGWINMGR
  1066. BOOL
  1067. WINAPI
  1068. ScrollDC(
  1069.     HDC hDC,
  1070.     int dx,
  1071.     int dy,
  1072.     CONST RECT *lprcScroll,
  1073.     CONST RECT *lprcClip ,
  1074.     HRGN hrgnUpdate,
  1075.     LPRECT lprcUpdate);
  1076. // @CESYSGEN ENDIF
  1077.  
  1078.  
  1079. // @CESYSGEN IF GWES_MENU
  1080. /*
  1081.  * Menu flags
  1082.  */
  1083. #define MF_BYCOMMAND        0x00000000L
  1084. #define MF_BYPOSITION       0x00000400L
  1085.  
  1086. #define MF_SEPARATOR        0x00000800L
  1087.  
  1088. #define MF_ENABLED          0x00000000L
  1089. #define MF_GRAYED           0x00000001L
  1090.  
  1091. #define MF_UNCHECKED        0x00000000L
  1092. #define MF_CHECKED          0x00000008L
  1093.  
  1094. #define MF_STRING           0x00000000L
  1095. #define MF_OWNERDRAW        0x00000100L
  1096.  
  1097. #define MF_POPUP            0x00000010L
  1098. // @CESYSGEN IF GWES_COLUMN
  1099. #define MF_MENUBARBREAK     0x00000020L
  1100. #define MF_MENUBREAK        0x00000040L
  1101. // @CESYSGEN ENDIF
  1102.  
  1103. #define MF_UNHILITE         0x00000000L
  1104. #define MF_HILITE           0x00000080L
  1105.  
  1106. #define MF_END              0x00000080L  /* Obsolete -- only used by old RES files */
  1107.  
  1108. #define MFT_STRING          MF_STRING
  1109. #define MFT_MENUBARBREAK    MF_MENUBARBREAK
  1110. #define MFT_MENUBREAK       MF_MENUBREAK
  1111. #define MFT_OWNERDRAW       MF_OWNERDRAW
  1112. #define MFT_RADIOCHECK      0x00000200L
  1113. #define MFT_SEPARATOR       MF_SEPARATOR
  1114.  
  1115. /* Menu flags for Add/Check/EnableMenuItem() */
  1116. #define MFS_CHECKED         MF_CHECKED
  1117. #define MFS_HILITE          MF_HILITE
  1118. #define MFS_ENABLED         MF_ENABLED
  1119. #define MFS_UNCHECKED       MF_UNCHECKED
  1120. #define MFS_UNHILITE        MF_UNHILITE
  1121.  
  1122.  
  1123. #define SC_CLOSE        0xF060
  1124. #define SC_KEYMENU      0xF100
  1125.  
  1126. BOOL
  1127. WINAPI
  1128. CheckMenuRadioItem(HMENU, UINT, UINT, UINT, UINT);
  1129. // @CESYSGEN ENDIF
  1130.  
  1131. // @CESYSGEN IF GWES_LOADBMP
  1132. HBITMAP
  1133. WINAPI
  1134. LoadBitmapA(
  1135.     HINSTANCE hInstance,
  1136.     LPCSTR lpBitmapName);
  1137.  
  1138. HBITMAP
  1139. WINAPI
  1140. LoadBitmapW(
  1141.     HINSTANCE hInstance,
  1142.     LPCWSTR lpBitmapName);
  1143. #ifdef UNICODE
  1144. #define LoadBitmap  LoadBitmapW
  1145. #else
  1146. #define LoadBitmap  LoadBitmapA
  1147. #endif // !UNICODE
  1148. // @CESYSGEN ENDIF
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160. // @CESYSGEN IF GWES_LOADSTR
  1161. int
  1162. WINAPI
  1163. LoadStringA(
  1164.     HINSTANCE hInstance,
  1165.     UINT uID,
  1166.     LPSTR lpBuffer,
  1167.     int nBufferMax);
  1168.  
  1169. int
  1170. WINAPI
  1171. LoadStringW(
  1172.     HINSTANCE hInstance,
  1173.     UINT uID,
  1174.     LPWSTR lpBuffer,
  1175.     int nBufferMax);
  1176. #ifdef UNICODE
  1177. #define LoadString  LoadStringW
  1178. #else
  1179. #define LoadString  LoadStringA
  1180. #endif // !UNICODE
  1181. // @CESYSGEN ENDIF
  1182.  
  1183.  
  1184. // @CESYSGEN IF GWES_WMBASE
  1185. /*
  1186.  * GetSystemMetrics() codes
  1187.  */
  1188. #define SM_CXSCREEN             0
  1189. #define SM_CYSCREEN             1
  1190. #define SM_CXVSCROLL            2
  1191. #define SM_CYHSCROLL            3
  1192. #define SM_CYCAPTION            4
  1193. #define SM_CXBORDER             5
  1194. #define SM_CYBORDER             6
  1195. #define SM_CXDLGFRAME           7
  1196. #define SM_CYDLGFRAME           8
  1197. #define SM_CXICON               11
  1198. #define SM_CYICON               12
  1199. // @CESYSGEN IF GWES_ICONCURS
  1200. #define SM_CXCURSOR             13
  1201. #define SM_CYCURSOR             14
  1202. // @CESYSGEN ENDIF
  1203. #define SM_CYMENU               15
  1204. #define SM_MOUSEPRESENT         19
  1205. #define SM_CYVSCROLL            20
  1206. #define SM_CXHSCROLL            21
  1207. #define SM_DEBUG                22
  1208. #define SM_CXDOUBLECLK          36
  1209. #define SM_CYDOUBLECLK          37
  1210. #define SM_CXICONSPACING        38
  1211. #define SM_CYICONSPACING        39
  1212. #define SM_CXEDGE               45
  1213. #define SM_CYEDGE               46
  1214. #define SM_CXSMICON             49
  1215. #define SM_CYSMICON             50
  1216.  
  1217. #define SM_CXFIXEDFRAME         SM_CXDLGFRAME
  1218. #define SM_CYFIXEDFRAME         SM_CYDLGFRAME
  1219.  
  1220.  
  1221. // @CESYSGEN ENDIF
  1222.  
  1223.  
  1224. // @CESYSGEN IF GWES_MENU
  1225. HMENU
  1226. WINAPI
  1227. LoadMenuA(
  1228.     HINSTANCE hInstance,
  1229.     LPCSTR lpMenuName);
  1230.  
  1231. HMENU
  1232. WINAPI
  1233. LoadMenuW(
  1234.     HINSTANCE hInstance,
  1235.     LPCWSTR lpMenuName);
  1236. #ifdef UNICODE
  1237. #define LoadMenu  LoadMenuW
  1238. #else
  1239. #define LoadMenu  LoadMenuA
  1240. #endif // !UNICODE
  1241.  
  1242. BOOL
  1243. WINAPI
  1244. DrawMenuBar(
  1245.     HWND hWnd);
  1246.  
  1247. HMENU
  1248. WINAPI
  1249. CreateMenu(
  1250.     VOID);
  1251.  
  1252.  
  1253. HMENU
  1254. WINAPI
  1255. CreatePopupMenu(
  1256.     VOID);
  1257.  
  1258.  
  1259. BOOL
  1260. WINAPI
  1261. DestroyMenu(
  1262.     HMENU hMenu);
  1263.  
  1264.  
  1265. DWORD
  1266. WINAPI
  1267. CheckMenuItem(
  1268.     HMENU hMenu,
  1269.     UINT uIDCheckItem,
  1270.     UINT uCheck);
  1271.  
  1272.  
  1273. BOOL
  1274. WINAPI
  1275. EnableMenuItem(
  1276.     HMENU hMenu,
  1277.     UINT uIDEnableItem,
  1278.     UINT uEnable);
  1279.  
  1280. HMENU
  1281. WINAPI
  1282. GetSubMenu(
  1283.     HMENU hMenu,
  1284.     int nPos);
  1285.  
  1286. BOOL
  1287. WINAPI
  1288. InsertMenuA(
  1289.     HMENU hMenu,
  1290.     UINT uPosition,
  1291.     UINT uFlags,
  1292.     UINT uIDNewItem,
  1293.     LPCSTR lpNewItem
  1294.     );
  1295.  
  1296. BOOL
  1297. WINAPI
  1298. InsertMenuW(
  1299.     HMENU hMenu,
  1300.     UINT uPosition,
  1301.     UINT uFlags,
  1302.     UINT uIDNewItem,
  1303.     LPCWSTR lpNewItem
  1304.     );
  1305. #ifdef UNICODE
  1306. #define InsertMenu  InsertMenuW
  1307. #else
  1308. #define InsertMenu  InsertMenuA
  1309. #endif // !UNICODE
  1310.  
  1311.  
  1312. BOOL
  1313. WINAPI
  1314. AppendMenuA(
  1315.     HMENU hMenu,
  1316.     UINT uFlags,
  1317.     UINT uIDNewItem,
  1318.     LPCSTR lpNewItem
  1319.     );
  1320.  
  1321. BOOL
  1322. WINAPI
  1323. AppendMenuW(
  1324.     HMENU hMenu,
  1325.     UINT uFlags,
  1326.     UINT uIDNewItem,
  1327.     LPCWSTR lpNewItem
  1328.     );
  1329. #ifdef UNICODE
  1330. #define AppendMenu  AppendMenuW
  1331. #else
  1332. #define AppendMenu  AppendMenuA
  1333. #endif // !UNICODE
  1334.  
  1335. BOOL
  1336. WINAPI RemoveMenu(
  1337.     HMENU hMenu,
  1338.     UINT uPosition,
  1339.     UINT uFlags);
  1340.  
  1341.  
  1342. BOOL
  1343. WINAPI
  1344. DeleteMenu(
  1345.     HMENU hMenu,
  1346.     UINT uPosition,
  1347.     UINT uFlags);
  1348.  
  1349.  
  1350.  
  1351. BOOL
  1352. WINAPI
  1353. TrackPopupMenu(
  1354.     HMENU hMenu,
  1355.     UINT uFlags,
  1356.     int x,
  1357.     int y,
  1358.     int nReserved,
  1359.     HWND hWnd,
  1360.     CONST RECT *prcRect);
  1361.  
  1362. typedef struct tagTPMPARAMS
  1363. {
  1364.     UINT    cbSize;     /* Size of structure */
  1365.     RECT    rcExclude;  /* Screen coordinates of rectangle to exclude when positioning */
  1366. }   TPMPARAMS;
  1367. typedef TPMPARAMS FAR *LPTPMPARAMS;
  1368.  
  1369. BOOL
  1370. WINAPI
  1371. TrackPopupMenuEx(
  1372.     HMENU hmenu,
  1373.     UINT uFlags,
  1374.     int x,
  1375.     int y,
  1376.     HWND hwnd,
  1377.     LPTPMPARAMS lptpm);
  1378.  
  1379. #define TrackPopupMenu(hm,u,x,y,r,hw,p) \
  1380.         TrackPopupMenuEx((hm),(u),(x),(y),(hw),0)
  1381.  
  1382. // WINCE doesn't support a system menu, but in order
  1383. // to maintain application compatibility we provide this
  1384. // macro to allow disabling of the close box on the caption.
  1385. #define GetSystemMenu(hwnd, bRevert)    ((HMENU)(hwnd))
  1386.  
  1387. /* return codes for WM_MENUCHAR */
  1388. #define MNC_IGNORE  0
  1389. #define MNC_CLOSE   1
  1390. #define MNC_EXECUTE 2
  1391. #define MNC_SELECT  3
  1392.  
  1393.  
  1394. #define MIIM_STATE       0x00000001
  1395. #define MIIM_ID          0x00000002
  1396. #define MIIM_SUBMENU     0x00000004
  1397. #define MIIM_CHECKMARKS  0x00000008
  1398. #define MIIM_TYPE        0x00000010
  1399. #define MIIM_DATA        0x00000020
  1400.  
  1401. typedef struct tagMENUITEMINFOA
  1402. {
  1403.     UINT    cbSize;
  1404.     UINT    fMask;
  1405.     UINT    fType;          // used if MIIM_TYPE
  1406.     UINT    fState;         // used if MIIM_STATE
  1407.     UINT    wID;            // used if MIIM_ID
  1408.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  1409.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  1410.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  1411.     DWORD   dwItemData;     // used if MIIM_DATA
  1412.     LPSTR   dwTypeData;     // used if MIIM_TYPE
  1413.     UINT    cch;            // used if MIIM_TYPE
  1414. }   MENUITEMINFOA, FAR *LPMENUITEMINFOA;
  1415. typedef struct tagMENUITEMINFOW
  1416. {
  1417.     UINT    cbSize;
  1418.     UINT    fMask;
  1419.     UINT    fType;          // used if MIIM_TYPE
  1420.     UINT    fState;         // used if MIIM_STATE
  1421.     UINT    wID;            // used if MIIM_ID
  1422.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  1423.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  1424.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  1425.     DWORD   dwItemData;     // used if MIIM_DATA
  1426.     LPWSTR  dwTypeData;     // used if MIIM_TYPE
  1427.     UINT    cch;            // used if MIIM_TYPE
  1428. }   MENUITEMINFOW, FAR *LPMENUITEMINFOW;
  1429. #ifdef UNICODE
  1430. typedef MENUITEMINFOW MENUITEMINFO;
  1431. typedef LPMENUITEMINFOW LPMENUITEMINFO;
  1432. #else
  1433. typedef MENUITEMINFOA MENUITEMINFO;
  1434. typedef LPMENUITEMINFOA LPMENUITEMINFO;
  1435. #endif // UNICODE
  1436. typedef MENUITEMINFOA CONST FAR *LPCMENUITEMINFOA;
  1437. typedef MENUITEMINFOW CONST FAR *LPCMENUITEMINFOW;
  1438. #ifdef UNICODE
  1439. typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
  1440. #else
  1441. typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
  1442. #endif // UNICODE
  1443.  
  1444.   WINUSERAPI
  1445.   BOOL
  1446.   WINAPI
  1447. GetMenuItemInfoA(
  1448.     HMENU,
  1449.     UINT,
  1450.     BOOL,
  1451.     LPMENUITEMINFOA
  1452.     );
  1453.  
  1454.  WINUSERAPI
  1455.   BOOL
  1456.   WINAPI
  1457. GetMenuItemInfoW(
  1458.     HMENU,
  1459.     UINT,
  1460.     BOOL,
  1461.     LPMENUITEMINFOW
  1462.     );
  1463.  
  1464. #ifdef UNICODE
  1465. #define GetMenuItemInfo  GetMenuItemInfoW
  1466. #else
  1467. #define GetMenuItemInfo  GetMenuItemInfoA
  1468. #endif // !UNICODE
  1469.  
  1470.  
  1471.  
  1472. WINUSERAPI
  1473. BOOL
  1474. WINAPI
  1475. SetMenuItemInfoA(
  1476.     HMENU,
  1477.     UINT,
  1478.     BOOL,
  1479.     LPCMENUITEMINFOA
  1480.     );
  1481. WINUSERAPI
  1482. BOOL
  1483. WINAPI
  1484. SetMenuItemInfoW(
  1485.     HMENU,
  1486.     UINT,
  1487.     BOOL,
  1488.     LPCMENUITEMINFOW
  1489.     );
  1490. #ifdef UNICODE
  1491. #define SetMenuItemInfo  SetMenuItemInfoW
  1492. #else
  1493. #define SetMenuItemInfo  SetMenuItemInfoA
  1494. #endif // !UNICODE
  1495.  
  1496.  
  1497.  
  1498. /*
  1499.  * Flags for TrackPopupMenu
  1500.  */
  1501. #define TPM_LEFTALIGN   0x0000L
  1502. #define TPM_CENTERALIGN 0x0004L
  1503. #define TPM_RIGHTALIGN  0x0008L
  1504.  
  1505. #define TPM_TOPALIGN        0x0000L
  1506. #define TPM_VCENTERALIGN    0x0010L
  1507. #define TPM_BOTTOMALIGN     0x0020L
  1508.  
  1509. #define TPM_HORIZONTAL      0x0000L     /* Horz alignment matters more */
  1510. #define TPM_VERTICAL        0x0040L     /* Vert alignment matters more */
  1511. #define TPM_NONOTIFY        0x0080L     /* Don't send any notification msgs */
  1512. #define TPM_RETURNCMD       0x0100L
  1513. // @CESYSGEN ENDIF
  1514.  
  1515.  
  1516. // @CESYSGEN IF COREDLL_ACCEL_C
  1517. /*
  1518.  * Defines for the fVirt field of the Accelerator table structure.
  1519.  */
  1520. #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
  1521. #define FNOINVERT 0x02
  1522. #define FSHIFT    0x04
  1523. #define FCONTROL  0x08
  1524. #define FALT      0x10
  1525.  
  1526. /*    The resource entries in the module each have an extra word of padding
  1527. between accelerator entries.  Win95 and WinNT both monkey with the
  1528. resource loading process to make the resulting memory image have 24-bits
  1529. but we just add the extra padding to the structure.  */
  1530. typedef struct tagACCEL {
  1531.     BYTE   fVirt;               /* Also called the flags field */
  1532.     WORD   key;
  1533.     WORD   cmd;
  1534.     WORD   pad;                    /* Different from Win95 and WinNT */
  1535. } ACCEL, *LPACCEL;
  1536.  
  1537.  
  1538. HACCEL
  1539. WINAPI
  1540. LoadAcceleratorsA(
  1541.     HINSTANCE hInstance,
  1542.     LPCSTR lpTableName);
  1543.  
  1544. HACCEL
  1545. WINAPI
  1546. LoadAcceleratorsW(
  1547.     HINSTANCE hInstance,
  1548.     LPCWSTR lpTableName);
  1549. #ifdef UNICODE
  1550. #define LoadAccelerators  LoadAcceleratorsW
  1551. #else
  1552. #define LoadAccelerators  LoadAcceleratorsA
  1553. #endif // !UNICODE
  1554.  
  1555.  
  1556. HACCEL
  1557. WINAPI
  1558. CreateAcceleratorTableA(
  1559.     LPACCEL, int);
  1560.  
  1561. HACCEL
  1562. WINAPI
  1563. CreateAcceleratorTableW(
  1564.     LPACCEL, int);
  1565. #ifdef UNICODE
  1566. #define CreateAcceleratorTable  CreateAcceleratorTableW
  1567. #else
  1568. #define CreateAcceleratorTable  CreateAcceleratorTableA
  1569. #endif // !UNICODE
  1570.  
  1571. BOOL
  1572. WINAPI
  1573. DestroyAcceleratorTable(
  1574.     HACCEL hAccel);
  1575.  
  1576. // @CESYSGEN ENDIF
  1577.  
  1578. // @CESYSGEN IF GWES_WINMGR
  1579. BOOL
  1580. WINAPI
  1581. SetSysColors(
  1582.     int cElements,
  1583.     CONST INT * lpaElements,
  1584.     CONST COLORREF * lpaRgbValues);
  1585.  
  1586. // @CESYSGEN ENDIF
  1587.  
  1588. // @CESYSGEN IF COREDLL_RECTAPI
  1589. BOOL
  1590. WINAPI
  1591. SetRect(
  1592.     LPRECT lprc,
  1593.     int xLeft,
  1594.     int yTop,
  1595.     int xRight,
  1596.     int yBottom);
  1597.  
  1598. BOOL
  1599. WINAPI
  1600. SetRectEmpty(
  1601.     LPRECT lprc);
  1602.  
  1603. BOOL
  1604. WINAPI
  1605. CopyRect(
  1606.     LPRECT lprcDst,
  1607.     CONST RECT *lprcSrc);
  1608.  
  1609. BOOL
  1610. WINAPI
  1611. InflateRect(
  1612.     LPRECT lprc,
  1613.     int dx,
  1614.     int dy);
  1615.  
  1616. BOOL
  1617. WINAPI
  1618. IntersectRect(
  1619.     LPRECT lprcDst,
  1620.     CONST RECT *lprcSrc1,
  1621.     CONST RECT *lprcSrc2);
  1622.  
  1623. BOOL
  1624. WINAPI
  1625. UnionRect(
  1626.     LPRECT lprcDst,
  1627.     CONST RECT *lprcSrc1,
  1628.     CONST RECT *lprcSrc2);
  1629.  
  1630. BOOL
  1631. WINAPI
  1632. OffsetRect(
  1633.     LPRECT lprc,
  1634.     int dx,
  1635.     int dy);
  1636.  
  1637. BOOL
  1638. WINAPI
  1639. IsRectEmpty(
  1640.     CONST RECT *lprc);
  1641.  
  1642. BOOL
  1643. WINAPI
  1644. EqualRect(
  1645.     CONST RECT *lprc1,
  1646.     CONST RECT *lprc2);
  1647.  
  1648. BOOL
  1649. WINAPI
  1650. PtInRect(
  1651.     CONST RECT *lprc,
  1652.     POINT pt);
  1653.  
  1654. BOOL
  1655. WINAPI
  1656. SubtractRect(
  1657.     LPRECT prcDst,
  1658.     CONST RECT *prcSrc1,
  1659.     CONST RECT *prcSrc2);
  1660.  
  1661. // @CESYSGEN ENDIF
  1662.  
  1663. // @CESYSGEN IF GWES_WINMGR
  1664. int
  1665. WINAPI
  1666. MapWindowPoints(
  1667.     HWND hWndFrom,
  1668.     HWND hWndTo,
  1669.     LPPOINT lpPoints,
  1670.     UINT cPoints);
  1671.  
  1672. HWND
  1673. WINAPI
  1674. WindowFromPoint(
  1675.     POINT Point);
  1676.  
  1677. HWND
  1678. WINAPI
  1679. ChildWindowFromPoint(
  1680.     HWND hWndParent,
  1681.     POINT Point);
  1682.  
  1683. BOOL
  1684. WINAPI
  1685. ClientToScreen(
  1686.     HWND hWnd,
  1687.     LPPOINT lpPoint);
  1688.  
  1689. BOOL
  1690. WINAPI
  1691. ScreenToClient(
  1692.     HWND hWnd,
  1693.     LPPOINT lpPoint);
  1694.  
  1695.  
  1696. typedef struct _PAINTSTRUCT {
  1697.     HDC     hdc;                /* display DC to be used for painting */
  1698.     BOOL    fErase;             /* Indicates whether background needs erased */
  1699.     RECT    rcPaint;            /* Rectangle where painting required */
  1700.     BOOL    fRestore;           /* RESERVED */
  1701.     BOOL    fIncUpdate;         /* RESERVED */
  1702.     BYTE    rgbReserved[32];    /* RESERVED */
  1703. } PAINTSTRUCT;
  1704.  
  1705. typedef PAINTSTRUCT *LPPAINTSTRUCT;
  1706. typedef PAINTSTRUCT *PPAINTSTRUCT;
  1707. typedef const PAINTSTRUCT *LPCPAINTSTRUCT;
  1708. typedef const PAINTSTRUCT *PCPAINTSTRUCT;
  1709.  
  1710.  
  1711.  
  1712. BOOL
  1713. WINAPI
  1714. SetWindowTextA(
  1715.     HWND hWnd,
  1716.     LPCSTR lpString);
  1717.  
  1718. BOOL
  1719. WINAPI
  1720. SetWindowTextW(
  1721.     HWND hWnd,
  1722.     LPCWSTR lpString);
  1723. #ifdef UNICODE
  1724. #define SetWindowText  SetWindowTextW
  1725. #else
  1726. #define SetWindowText  SetWindowTextA
  1727. #endif // !UNICODE
  1728.  
  1729.  
  1730. int
  1731. WINAPI
  1732. GetWindowTextA(
  1733.     HWND hWnd,
  1734.     LPSTR lpString,
  1735.     int nMaxCount);
  1736.  
  1737. int
  1738. WINAPI
  1739. GetWindowTextW(
  1740.     HWND hWnd,
  1741.     LPWSTR lpString,
  1742.     int nMaxCount);
  1743. #ifdef UNICODE
  1744. #define GetWindowText  GetWindowTextW
  1745. #else
  1746. #define GetWindowText  GetWindowTextA
  1747. #endif // !UNICODE
  1748.  
  1749.  
  1750.  
  1751. HDC
  1752. WINAPI
  1753. BeginPaint (
  1754.     HWND hwnd,
  1755.     LPPAINTSTRUCT pps
  1756.     );
  1757.  
  1758. BOOL
  1759. WINAPI
  1760. EndPaint (
  1761.     HWND hwnd,
  1762.     LPPAINTSTRUCT pps
  1763.     );
  1764.  
  1765. BOOL
  1766. WINAPI
  1767. GetUpdateRect(
  1768.     HWND hWnd,
  1769.     LPRECT lpRect,
  1770.     BOOL bErase);
  1771.  
  1772. int
  1773. WINAPI
  1774. GetUpdateRgn(
  1775.     HWND hWnd,
  1776.     HRGN hRgn,
  1777.     BOOL bErase);
  1778.  
  1779. HDC
  1780. WINAPI
  1781. GetDC (
  1782.     HWND hwnd
  1783.     );
  1784.  
  1785. WINUSERAPI
  1786. HDC
  1787. WINAPI
  1788. GetDCEx(
  1789.     HWND hWnd ,
  1790.     HRGN hrgnClip,
  1791.     DWORD flags);
  1792.  
  1793. /*
  1794.  * GetDCEx() flags
  1795.  */
  1796. #define DCX_WINDOW           0x00000001L
  1797. #define DCX_CACHE            0x00000002L
  1798. #define DCX_CLIPCHILDREN     0x00000008L
  1799. #define DCX_CLIPSIBLINGS     0x00000010L
  1800.  
  1801. #define DCX_EXCLUDERGN       0x00000040L
  1802. #define DCX_INTERSECTRGN     0x00000080L
  1803.  
  1804. #define DCX_EXCLUDEUPDATE    0x00000100L
  1805. #define DCX_INTERSECTUPDATE  0x00000200L
  1806.  
  1807.  
  1808.  
  1809. HDC
  1810. WINAPI
  1811. GetWindowDC (
  1812.     HWND hwnd
  1813.     );
  1814.  
  1815. int
  1816. WINAPI
  1817. ReleaseDC (
  1818.     HWND hwnd,
  1819.     HDC hdc
  1820.     );
  1821.  
  1822.  
  1823.  
  1824.  
  1825. // @CESYSGEN ENDIF
  1826.  
  1827.  
  1828. // @CESYSGEN IF GWES_WMBASE
  1829.  
  1830. #define WM_NULL                         0x0000
  1831. #define WM_CREATE                       0x0001
  1832. #define WM_DESTROY                      0x0002
  1833.  
  1834. #define WM_CLOSE                        0x0010
  1835. #define WM_QUIT                         0x0012
  1836.  
  1837.  
  1838. #define WM_COPYDATA                     0x004A
  1839. /*
  1840.  * lParam of WM_COPYDATA message points to...
  1841.  */
  1842. typedef struct tagCOPYDATASTRUCT {
  1843.     DWORD dwData;
  1844.     DWORD cbData;
  1845.     PVOID lpData;
  1846. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  1847.  
  1848.  
  1849. BOOL
  1850. WINAPI
  1851. IsWindow(
  1852.     HWND hWnd);
  1853.  
  1854. BOOL
  1855. WINAPI
  1856. IsWindowVisible(
  1857.     HWND hWnd);
  1858.  
  1859.  
  1860. #define WS_CHILD            0x40000000L
  1861. #define WS_VISIBLE          0x10000000L
  1862. #define WS_DISABLED         0x08000000L
  1863.  
  1864.  
  1865. #define WS_GROUP            0x00020000L
  1866. #define WS_TABSTOP          0x00010000L
  1867.  
  1868. #define WS_EX_NOACTIVATE    0x08000000L
  1869.  
  1870.  
  1871. #define CW_USEDEFAULT       ((int)0x80000000)
  1872.  
  1873. /*
  1874.  * Special value for CreateWindow, et al.
  1875.  */
  1876. #define HWND_DESKTOP        ((HWND)0)
  1877.  
  1878. HWND
  1879. WINAPI
  1880. CreateWindowExA(
  1881.     DWORD dwExStyle,
  1882.     LPCSTR lpClassName,
  1883.     LPCSTR lpWindowName,
  1884.     DWORD dwStyle,
  1885.     int X,
  1886.     int Y,
  1887.     int nWidth,
  1888.     int nHeight,
  1889.     HWND hWndParent ,
  1890.     HMENU hMenu,
  1891.     HINSTANCE hInstance,
  1892.     LPVOID lpParam);
  1893.  
  1894. HWND
  1895. WINAPI
  1896. CreateWindowExW(
  1897.     DWORD dwExStyle,
  1898.     LPCWSTR lpClassName,
  1899.     LPCWSTR lpWindowName,
  1900.     DWORD dwStyle,
  1901.     int X,
  1902.     int Y,
  1903.     int nWidth,
  1904.     int nHeight,
  1905.     HWND hWndParent ,
  1906.     HMENU hMenu,
  1907.     HINSTANCE hInstance,
  1908.     LPVOID lpParam);
  1909.  
  1910. #ifdef UNICODE
  1911. #define CreateWindowEx  CreateWindowExW
  1912. #else
  1913. #define CreateWindowEx  CreateWindowExA
  1914. #endif // !UNICODE
  1915.  
  1916. #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
  1917. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  1918. CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  1919. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  1920.  
  1921. #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
  1922. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  1923. CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  1924. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  1925.  
  1926. #ifdef UNICODE
  1927. #define CreateWindow  CreateWindowW
  1928. #else
  1929. #define CreateWindow  CreateWindowA
  1930. #endif // !UNICODE
  1931.  
  1932.  
  1933.  
  1934. BOOL
  1935. WINAPI
  1936. DestroyWindow (
  1937.     HWND hwnd
  1938.     );
  1939.  
  1940.  
  1941. #ifdef STRICT
  1942.  
  1943. WINUSERAPI
  1944. LRESULT
  1945. WINAPI
  1946. CallWindowProcA(
  1947.     WNDPROC lpPrevWndFunc,
  1948.     HWND hWnd,
  1949.     UINT Msg,
  1950.     WPARAM wParam,
  1951.     LPARAM lParam);
  1952. WINUSERAPI
  1953. LRESULT
  1954. WINAPI
  1955. CallWindowProcW(
  1956.     WNDPROC lpPrevWndFunc,
  1957.     HWND hWnd,
  1958.     UINT Msg,
  1959.     WPARAM wParam,
  1960.     LPARAM lParam);
  1961. #ifdef UNICODE
  1962. #define CallWindowProc  CallWindowProcW
  1963. #else
  1964. #define CallWindowProc  CallWindowProcA
  1965. #endif // !UNICODE
  1966.  
  1967. #else /* !STRICT */
  1968.  
  1969. WINUSERAPI
  1970. LRESULT
  1971. WINAPI
  1972. CallWindowProcA(
  1973.     FARPROC lpPrevWndFunc,
  1974.     HWND hWnd,
  1975.     UINT Msg,
  1976.     WPARAM wParam,
  1977.     LPARAM lParam);
  1978. WINUSERAPI
  1979. LRESULT
  1980. WINAPI
  1981. CallWindowProcW(
  1982.     FARPROC lpPrevWndFunc,
  1983.     HWND hWnd,
  1984.     UINT Msg,
  1985.     WPARAM wParam,
  1986.     LPARAM lParam);
  1987. #ifdef UNICODE
  1988. #define CallWindowProc  CallWindowProcW
  1989. #else
  1990. #define CallWindowProc  CallWindowProcA
  1991. #endif // !UNICODE
  1992.  
  1993. #endif /* !STRICT */
  1994.  
  1995.  
  1996. DWORD
  1997. WINAPI
  1998. GetWindowThreadProcessId(
  1999.     HWND hWnd,
  2000.     LPDWORD lpdwProcessId);
  2001.  
  2002. WINUSERAPI
  2003. UINT
  2004. WINAPI
  2005. GetDoubleClickTime (VOID);
  2006.  
  2007.  
  2008. int
  2009. WINAPI
  2010. GetSystemMetrics(
  2011.     int nIndex);
  2012.  
  2013. #ifndef UNICODE_ONLY
  2014. WINUSERAPI
  2015. DWORD
  2016. WINAPI
  2017. GetClassLongA(
  2018.     HWND hWnd,
  2019.     int nIndex);
  2020. #endif //!UNICODE_ONLY
  2021. #ifndef ANSI_ONLY
  2022. WINUSERAPI
  2023. DWORD
  2024. WINAPI
  2025. GetClassLongW(
  2026.     HWND hWnd,
  2027.     int nIndex);
  2028. #endif //!ANSI_ONLY
  2029. #ifdef UNICODE
  2030. #define GetClassLong  GetClassLongW
  2031. #else
  2032. #define GetClassLong  GetClassLongA
  2033. #endif // !UNICODE
  2034.  
  2035. #ifndef UNICODE_ONLY
  2036. WINUSERAPI
  2037. DWORD
  2038. WINAPI
  2039. SetClassLongA(
  2040.     HWND hWnd,
  2041.     int nIndex,
  2042.     LONG dwNewLong);
  2043. #endif //!UNICODE_ONLY
  2044. #ifndef ANSI_ONLY
  2045. WINUSERAPI
  2046. DWORD
  2047. WINAPI
  2048. SetClassLongW(
  2049.     HWND hWnd,
  2050.     int nIndex,
  2051.     LONG dwNewLong);
  2052. #endif //!ANSI_ONLY
  2053. #ifdef UNICODE
  2054. #define SetClassLong  SetClassLongW
  2055. #else
  2056. #define SetClassLong  SetClassLongA
  2057. #endif // !UNICODE
  2058.  
  2059. #define GCL_HCURSOR     (-12)
  2060. #define GCL_HICON       (-14)
  2061. #define GCL_STYLE       (-26)
  2062.  
  2063.  
  2064.  
  2065. // @CESYSGEN IF COREDLL_WMGR_C
  2066. /* RegisterClass */
  2067.  
  2068. ATOM
  2069. WINAPI
  2070. RegisterClassA(
  2071.     CONST WNDCLASSA *lpWndClass
  2072.     );
  2073.  
  2074. ATOM
  2075. WINAPI
  2076. RegisterClassW (
  2077.     CONST WNDCLASSW *lpWndClass
  2078.     );
  2079.  
  2080. #ifdef UNICODE
  2081. #define RegisterClass  RegisterClassW
  2082. #else
  2083. #define RegisterClass  RegisterClassA
  2084. #endif // !UNICODE
  2085. // @CESYSGEN ENDIF
  2086.  
  2087.  
  2088. #ifndef UNICODE_ONLY
  2089. WINUSERAPI
  2090. BOOL
  2091. WINAPI
  2092. UnregisterClassA(
  2093.     LPCSTR lpClassName,
  2094.     HINSTANCE hInstance);
  2095. #endif //!UNICODE_ONLY
  2096. #ifndef ANSI_ONLY
  2097. WINUSERAPI
  2098. BOOL
  2099. WINAPI
  2100. UnregisterClassW(
  2101.     LPCWSTR lpClassName,
  2102.     HINSTANCE hInstance);
  2103. #endif //!ANSI_ONLY
  2104. #ifdef UNICODE
  2105. #define UnregisterClass  UnregisterClassW
  2106. #else
  2107. #define UnregisterClass  UnregisterClassA
  2108. #endif // !UNICODE
  2109.  
  2110.  
  2111. BOOL
  2112. WINAPI
  2113. GetClassInfoA(
  2114.     HINSTANCE hInstance,
  2115.     LPCSTR lpClassName,
  2116.     LPWNDCLASSA lpWndClass);
  2117.  
  2118. BOOL
  2119. WINAPI
  2120. GetClassInfoW(
  2121.     HINSTANCE hInstance,
  2122.     LPCWSTR lpClassName,
  2123.     LPWNDCLASSW lpWndClass);
  2124. #ifdef UNICODE
  2125. #define GetClassInfo  GetClassInfoW
  2126. #else
  2127. #define GetClassInfo  GetClassInfoA
  2128. #endif // !UNICODE
  2129.  
  2130.  
  2131. #define WM_ENABLE                       0x000A
  2132.  
  2133. BOOL
  2134. WINAPI
  2135. EnableWindow(
  2136.     HWND hWnd,
  2137.     BOOL bEnable);
  2138.  
  2139. BOOL
  2140. WINAPI
  2141. IsWindowEnabled(
  2142.     HWND hWnd);
  2143.  
  2144. /*
  2145.  * Color Types
  2146.  */
  2147. #ifdef UNDER_NT
  2148. #define SYS_COLOR_INDEX_FLAG        0
  2149. #else
  2150. #define SYS_COLOR_INDEX_FLAG        0x40000000
  2151. #endif // UNDER_NT
  2152. #define COLOR_SCROLLBAR           ( 0 | SYS_COLOR_INDEX_FLAG)
  2153. #define COLOR_BACKGROUND          ( 1 | SYS_COLOR_INDEX_FLAG)
  2154. #define COLOR_ACTIVECAPTION       ( 2 | SYS_COLOR_INDEX_FLAG)
  2155. #define COLOR_INACTIVECAPTION     ( 3 | SYS_COLOR_INDEX_FLAG)
  2156. #define COLOR_MENU                ( 4 | SYS_COLOR_INDEX_FLAG)
  2157. #define COLOR_WINDOW              ( 5 | SYS_COLOR_INDEX_FLAG)
  2158. #define COLOR_WINDOWFRAME         ( 6 | SYS_COLOR_INDEX_FLAG)
  2159. #define COLOR_MENUTEXT            ( 7 | SYS_COLOR_INDEX_FLAG)
  2160. #define COLOR_WINDOWTEXT          ( 8 | SYS_COLOR_INDEX_FLAG)
  2161. #define COLOR_CAPTIONTEXT         ( 9 | SYS_COLOR_INDEX_FLAG)
  2162. #define COLOR_ACTIVEBORDER        (10 | SYS_COLOR_INDEX_FLAG)
  2163. #define COLOR_INACTIVEBORDER      (11 | SYS_COLOR_INDEX_FLAG)
  2164. #define COLOR_APPWORKSPACE        (12 | SYS_COLOR_INDEX_FLAG)
  2165. #define COLOR_HIGHLIGHT           (13 | SYS_COLOR_INDEX_FLAG)
  2166. #define COLOR_HIGHLIGHTTEXT       (14 | SYS_COLOR_INDEX_FLAG)
  2167. #define COLOR_BTNFACE             (15 | SYS_COLOR_INDEX_FLAG)
  2168. #define COLOR_BTNSHADOW           (16 | SYS_COLOR_INDEX_FLAG)
  2169. #define COLOR_GRAYTEXT            (17 | SYS_COLOR_INDEX_FLAG)
  2170. #define COLOR_BTNTEXT             (18 | SYS_COLOR_INDEX_FLAG)
  2171. #define COLOR_INACTIVECAPTIONTEXT (19 | SYS_COLOR_INDEX_FLAG)
  2172. #define COLOR_BTNHIGHLIGHT        (20 | SYS_COLOR_INDEX_FLAG)
  2173.  
  2174. #define COLOR_3DDKSHADOW          (21 | SYS_COLOR_INDEX_FLAG)
  2175. #define COLOR_3DLIGHT             (22 | SYS_COLOR_INDEX_FLAG)
  2176. #define COLOR_INFOTEXT            (23 | SYS_COLOR_INDEX_FLAG)
  2177. #define COLOR_INFOBK              (24 | SYS_COLOR_INDEX_FLAG)
  2178. #if defined (_WIN32_WCE_EMULATION) && !defined (_WIN32_WCE_EMULATION_CDECL)
  2179. #define COLOR_STATIC            COLOR_BTNFACE
  2180. #define COLOR_STATICTEXT        COLOR_BTNFACE
  2181. #else  // _WIN32_WCE_EMULATION
  2182. #define COLOR_STATIC            (25 | SYS_COLOR_INDEX_FLAG)
  2183. #define COLOR_STATICTEXT        (26 | SYS_COLOR_INDEX_FLAG)
  2184. #endif  // _WIN32_WCE_EMULATION
  2185. #define C_SYS_COLOR_TYPES        27
  2186.  
  2187. #define COLOR_DESKTOP           COLOR_BACKGROUND
  2188. #define COLOR_3DFACE            COLOR_BTNFACE
  2189. #define COLOR_3DSHADOW          COLOR_BTNSHADOW
  2190. #define COLOR_3DHIGHLIGHT       COLOR_BTNHIGHLIGHT
  2191. #define COLOR_3DHILIGHT         COLOR_BTNHIGHLIGHT
  2192.  
  2193. DWORD
  2194. WINAPI
  2195. GetSysColor(
  2196.     int nIndex);
  2197.  
  2198. // @CESYSGEN ENDIF
  2199.  
  2200.  
  2201. // @CESYSGEN IF GWES_UIBASE
  2202.  
  2203.  
  2204. BOOL
  2205. WINAPI
  2206. GetMouseMovePoints(
  2207.     PPOINT    pptBuf,
  2208.     UINT    nBufPoints,
  2209.     UINT    *pnPointsRetrieved
  2210.     );
  2211.  
  2212.  
  2213. #define MOUSEEVENTF_MOVE        0x0001 /* mouse move */
  2214. #define MOUSEEVENTF_LEFTDOWN    0x0002 /* left button down */
  2215. #define MOUSEEVENTF_LEFTUP      0x0004 /* left button up */
  2216. #define MOUSEEVENTF_RIGHTDOWN   0x0008 /* right button down */
  2217. #define MOUSEEVENTF_RIGHTUP     0x0010 /* right button up */
  2218. #define MOUSEEVENTF_MIDDLEDOWN  0x0020 /* middle button down */
  2219. #define MOUSEEVENTF_MIDDLEUP    0x0040 /* middle button up */
  2220. #define MOUSEEVENTF_WHEEL       0x0800 /* wheel button rolled */
  2221. #define MOUSEEVENTF_ABSOLUTE    0x8000 /* absolute move */
  2222.  
  2223. VOID
  2224. WINAPI
  2225. mouse_event(
  2226.     DWORD dwFlags,
  2227.     DWORD dx,
  2228.     DWORD dy,
  2229.     DWORD cButtons,
  2230.     DWORD dwExtraInfo);
  2231.  
  2232.  
  2233.  
  2234. typedef struct tagMOUSEINPUT {
  2235.     LONG    dx;
  2236.     LONG    dy;
  2237.     DWORD   mouseData;
  2238.     DWORD   dwFlags;
  2239.     DWORD   time;
  2240.     DWORD   dwExtraInfo;
  2241. } MOUSEINPUT, *PMOUSEINPUT, FAR* LPMOUSEINPUT;
  2242.  
  2243. typedef struct tagKEYBDINPUT {
  2244.     WORD    wVk;
  2245.     WORD    wScan;
  2246.     DWORD   dwFlags;
  2247.     DWORD   time;
  2248.     DWORD   dwExtraInfo;
  2249. } KEYBDINPUT, *PKEYBDINPUT, FAR* LPKEYBDINPUT;
  2250.  
  2251. typedef struct tagHARDWAREINPUT {
  2252.     DWORD   uMsg;
  2253.     WORD    wParamL;
  2254.     WORD    wParamH;
  2255.     DWORD   dwExtraInfo;
  2256. } HARDWAREINPUT, *PHARDWAREINPUT, FAR* LPHARDWAREINPUT;
  2257.  
  2258. #define INPUT_MOUSE     0
  2259. #define INPUT_KEYBOARD  1
  2260. #define INPUT_HARDWARE  2
  2261.  
  2262. typedef struct tagINPUT {
  2263.     DWORD   type;
  2264.     union
  2265.     {
  2266.         MOUSEINPUT      mi;
  2267.         KEYBDINPUT      ki;
  2268.         HARDWAREINPUT    hi;
  2269.     };
  2270. } INPUT, *PINPUT, FAR* LPINPUT;
  2271.  
  2272.  
  2273. WINUSERAPI
  2274. UINT
  2275. WINAPI
  2276. SendInput(
  2277.     UINT    nInputs,
  2278.     LPINPUT    pInputs,
  2279.     int        cbSize
  2280.     );
  2281.  
  2282.  
  2283. // @CESYSGEN ENDIF
  2284.  
  2285.  
  2286.  
  2287. // @CESYSGEN IF GWES_ACCEL
  2288. int
  2289. WINAPI
  2290. TranslateAcceleratorA(
  2291.     HWND hWnd,
  2292.     HACCEL hAccTable,
  2293.     LPMSG lpMsg);
  2294.  
  2295. int
  2296. WINAPI
  2297. TranslateAcceleratorW(
  2298.     HWND hWnd,
  2299.     HACCEL hAccTable,
  2300.     LPMSG lpMsg);
  2301. #ifdef UNICODE
  2302. #define TranslateAccelerator  TranslateAcceleratorW
  2303. #else
  2304. #define TranslateAccelerator  TranslateAcceleratorA
  2305. #endif
  2306. // @CESYSGEN ENDIF
  2307.  
  2308.  
  2309.  
  2310. // @CESYSGEN IF GWES_IDLE
  2311.  
  2312.  
  2313. void
  2314. WINAPI
  2315. SystemIdleTimerReset(
  2316.     void
  2317.     );
  2318. // @CESYSGEN ENDIF
  2319.  
  2320.  
  2321. // @CESYSGEN IF GWES_DEFWNDPROC
  2322.  
  2323. LRESULT
  2324. WINAPI
  2325. DefWindowProcA(
  2326.     HWND hWnd,
  2327.     UINT Msg,
  2328.     WPARAM wParam,
  2329.     LPARAM lParam);
  2330.  
  2331. LRESULT
  2332. WINAPI
  2333. DefWindowProcW(
  2334.     HWND hWnd,
  2335.     UINT Msg,
  2336.     WPARAM wParam,
  2337.     LPARAM lParam);
  2338. #ifdef UNICODE
  2339. #define DefWindowProc  DefWindowProcW
  2340. #else
  2341. #define DefWindowProc  DefWindowProcA
  2342. #endif // !UNICODE
  2343.  
  2344. // @CESYSGEN ENDIF
  2345.  
  2346.  
  2347.  
  2348.  
  2349. // @CESYSGEN IF GWES_GSETWINLONG
  2350.  
  2351. /*
  2352.  *  Window field offsets for GetWindowLong()
  2353.  */
  2354. #define GWL_WNDPROC         (-4)
  2355. #define GWL_STYLE           (-16)
  2356. #define GWL_EXSTYLE         (-20)
  2357. #define GWL_USERDATA        (-21)
  2358. #define GWL_ID              (-12)
  2359.  
  2360.  
  2361. LONG
  2362. WINAPI
  2363. GetWindowLongA(
  2364.     HWND hWnd,
  2365.     int nIndex);
  2366.  
  2367. LONG
  2368. WINAPI
  2369. GetWindowLongW(
  2370.     HWND hWnd,
  2371.     int nIndex);
  2372. #ifdef UNICODE
  2373. #define GetWindowLong  GetWindowLongW
  2374. #else
  2375. #define GetWindowLong  GetWindowLongA
  2376. #endif // !UNICODE
  2377.  
  2378.  
  2379. LONG
  2380. WINAPI
  2381. SetWindowLongA(
  2382.     HWND hWnd,
  2383.     int nIndex,
  2384.     LONG dwNewLong);
  2385.  
  2386. LONG
  2387. WINAPI
  2388. SetWindowLongW(
  2389.     HWND hWnd,
  2390.     int nIndex,
  2391.     LONG dwNewLong);
  2392. #ifdef UNICODE
  2393. #define SetWindowLong  SetWindowLongW
  2394. #else
  2395. #define SetWindowLong  SetWindowLongA
  2396. #endif // !UNICODE
  2397.  
  2398. // @CESYSGEN ENDIF
  2399.  
  2400.  
  2401.  
  2402. // @CESYSGEN IF GWES_WINMGR
  2403. /* Flags for ShowWindow */
  2404. #define SW_HIDE             0
  2405. #define SW_SHOWNORMAL       1
  2406. #define SW_SHOWNOACTIVATE   4
  2407. #define SW_SHOW             5
  2408. #define SW_MINIMIZE         6
  2409. #define SW_SHOWNA           8
  2410. #define SW_SHOWMAXIMIZED    11
  2411. #define SW_MAXIMIZE            12
  2412. #define SW_RESTORE            13
  2413.  
  2414.  
  2415. #ifdef UNDER_NT
  2416. #define SW_MAX              10
  2417. #endif
  2418.  
  2419. BOOL
  2420. WINAPI
  2421. IsChild(
  2422.     HWND hWndParent,
  2423.     HWND hWnd);
  2424.  
  2425.  
  2426. BOOL
  2427. WINAPI
  2428. ShowWindow (
  2429.     HWND hwnd,
  2430.     INT nCmdShow
  2431.     );
  2432.  
  2433. BOOL
  2434. WINAPI
  2435. UpdateWindow (
  2436.     HWND hwnd
  2437.     );
  2438.  
  2439. HWND
  2440. WINAPI
  2441. SetParent (
  2442.     HWND hwnd,
  2443.     HWND hwndParent
  2444.     );
  2445.  
  2446. HWND
  2447. WINAPI
  2448. GetParent (
  2449.     HWND hwnd
  2450.     );
  2451.  
  2452. WINUSERAPI
  2453. HWND
  2454. WINAPI
  2455. FindWindowA(
  2456.     LPCSTR lpClassName ,
  2457.     LPCSTR lpWindowName);
  2458. WINUSERAPI
  2459. HWND
  2460. WINAPI
  2461. FindWindowW(
  2462.     LPCWSTR lpClassName ,
  2463.     LPCWSTR lpWindowName);
  2464. #ifdef UNICODE
  2465. #define FindWindow  FindWindowW
  2466. #else
  2467. #define FindWindow  FindWindowA
  2468. #endif // !UNICODE
  2469.  
  2470.  
  2471. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  2472.  
  2473. BOOL
  2474. WINAPI
  2475. EnumWindows(
  2476.     WNDENUMPROC lpEnumFunc,
  2477.     LPARAM lParam);
  2478.  
  2479.  
  2480.  
  2481. int
  2482. WINAPI
  2483. GetClassNameA(
  2484.     HWND hWnd,
  2485.     LPSTR lpClassName,
  2486.     int nMaxCount);
  2487.  
  2488. int
  2489. WINAPI
  2490. GetClassNameW(
  2491.     HWND hWnd,
  2492.     LPWSTR lpClassName,
  2493.     int nMaxCount);
  2494. #ifdef UNICODE
  2495. #define GetClassName  GetClassNameW
  2496. #else
  2497. #define GetClassName  GetClassNameA
  2498. #endif // !UNICODE
  2499.  
  2500. // @CESYSGEN ENDIF
  2501. // @CESYSGEN IF GWES_MSGBOX
  2502. /*
  2503.  * MessageBox() Flags
  2504.  */
  2505. #define MB_OK                       0x00000000L
  2506. #define MB_OKCANCEL                 0x00000001L
  2507. #define MB_ABORTRETRYIGNORE         0x00000002L
  2508. #define MB_YESNOCANCEL              0x00000003L
  2509. #define MB_YESNO                    0x00000004L
  2510. #define MB_RETRYCANCEL              0x00000005L
  2511.  
  2512. #define MB_ICONHAND                 0x00000010L
  2513. #define MB_ICONQUESTION             0x00000020L
  2514. #define MB_ICONEXCLAMATION          0x00000030L
  2515. #define MB_ICONASTERISK             0x00000040L
  2516.  
  2517. #if(WINVER >= 0x0400)
  2518. #define MB_ICONWARNING              MB_ICONEXCLAMATION
  2519. #define MB_ICONERROR                MB_ICONHAND
  2520. #endif /* WINVER >= 0x0400 */
  2521.  
  2522. #define MB_ICONINFORMATION          MB_ICONASTERISK
  2523. #define MB_ICONSTOP                 MB_ICONHAND
  2524.  
  2525. #define MB_DEFBUTTON1               0x00000000L
  2526. #define MB_DEFBUTTON2               0x00000100L
  2527. #define MB_DEFBUTTON3               0x00000200L
  2528. #if(WINVER >= 0x0400)
  2529. #define MB_DEFBUTTON4               0x00000300L
  2530. #endif /* WINVER >= 0x0400 */
  2531.  
  2532. #define MB_APPLMODAL                0x00000000L
  2533. #define MB_SETFOREGROUND            0x00010000L
  2534.  
  2535. #define MB_TOPMOST                  0x00040000L
  2536.  
  2537. int
  2538. WINAPI
  2539. MessageBoxA(
  2540.     HWND hWnd ,
  2541.     LPCSTR lpText,
  2542.     LPCSTR lpCaption,
  2543.     UINT uType);
  2544.  
  2545. int
  2546. WINAPI
  2547. MessageBoxW(
  2548.     HWND hWnd ,
  2549.     LPCWSTR lpText,
  2550.     LPCWSTR lpCaption,
  2551.     UINT uType);
  2552. #ifdef UNICODE
  2553. #define MessageBox  MessageBoxW
  2554. #else
  2555. #define MessageBox  MessageBoxA
  2556. #endif // !UNICODE
  2557. // @CESYSGEN ENDIF
  2558.  
  2559. // @CESYSGEN IF GWES_MSGBEEP
  2560. BOOL
  2561. WINAPI
  2562. MessageBeep(
  2563.     UINT uType);
  2564. // @CESYSGEN ENDIF
  2565.  
  2566.  
  2567. // @CESYSGEN IF GWES_CARET
  2568. BOOL
  2569. WINAPI
  2570. CreateCaret(
  2571.     HWND hWnd,
  2572.     HBITMAP hBitmap,
  2573.     int nWidth,
  2574.     int nHeight);
  2575.  
  2576. BOOL
  2577. WINAPI
  2578. DestroyCaret(
  2579.     VOID);
  2580.  
  2581. BOOL
  2582. WINAPI
  2583. HideCaret(
  2584.     HWND hWnd);
  2585.  
  2586. BOOL
  2587. WINAPI
  2588. ShowCaret(
  2589.     HWND hWnd);
  2590.  
  2591. BOOL
  2592. WINAPI
  2593. SetCaretPos(
  2594.     int X,
  2595.     int Y);
  2596.  
  2597. BOOL
  2598. WINAPI
  2599. GetCaretPos(
  2600.     LPPOINT lpPoint);
  2601.  
  2602.  
  2603. BOOL
  2604. WINAPI
  2605. SetCaretBlinkTime(
  2606.     UINT uMSeconds
  2607.     );
  2608.  
  2609. UINT
  2610. WINAPI
  2611. GetCaretBlinkTime(
  2612.     VOID
  2613.     );
  2614. // @CESYSGEN ENDIF
  2615.  
  2616.  
  2617. // @CESYSGEN IF GWES_FOREGND
  2618. HWND
  2619. WINAPI
  2620. SetActiveWindow(
  2621.     HWND    hWnd);
  2622.  
  2623. HWND
  2624. WINAPI
  2625. GetForegroundWindow(
  2626.     VOID);
  2627.  
  2628. BOOL
  2629. WINAPI
  2630. SetForegroundWindow(
  2631.     HWND hWnd);
  2632.  
  2633.  
  2634. HWND
  2635. WINAPI
  2636. SetFocus(
  2637.     HWND hWnd
  2638.     );
  2639.  
  2640. HWND
  2641. WINAPI
  2642. GetActiveWindow(
  2643.     VOID
  2644.     );
  2645.  
  2646. HWND
  2647. WINAPI
  2648. GetFocus(
  2649.     VOID
  2650.     );
  2651.  
  2652.  
  2653. // @CESYSGEN ENDIF
  2654.  
  2655. // @CESYSGEN IF COREDLL_COREIMM
  2656. WINUSERAPI
  2657. HKL
  2658. WINAPI
  2659. GetKeyboardLayout(
  2660.     DWORD dwThreadId
  2661. );
  2662. // @CESYSGEN ENDIF
  2663.  
  2664.  
  2665.  
  2666.  
  2667. // @CESYSGEN IF GWES_KBDUI
  2668. SHORT
  2669. WINAPI
  2670. GetAsyncKeyState(
  2671.     int vKey);
  2672.  
  2673. SHORT
  2674. WINAPI
  2675. GetKeyState(
  2676.     int nVirtKey);
  2677.  
  2678. WINUSERAPI
  2679. VOID
  2680. WINAPI
  2681. keybd_event(
  2682.     BYTE bVk,
  2683.     BYTE bScan,
  2684.     DWORD dwFlags,
  2685.     DWORD dwExtraInfo);
  2686.  
  2687.  
  2688. WINUSERAPI
  2689. BOOL
  2690. WINAPI
  2691. PostKeybdMessage(
  2692.     HWND    hwnd,
  2693.     UINT    VKey,
  2694.     UINT    KeyStateFlags,
  2695.     UINT    cCharacters,
  2696.     UINT    *pShiftStateBuffer,
  2697.     UINT *pCharacterBuffer
  2698.     );
  2699.  
  2700.  
  2701. #define KL_NAMELENGTH       9
  2702.  
  2703. WINUSERAPI
  2704. BOOL
  2705. WINAPI
  2706. GetKeyboardLayoutNameA(
  2707.     LPSTR pwszKLID);
  2708. WINUSERAPI
  2709. BOOL
  2710. WINAPI
  2711. GetKeyboardLayoutNameW(
  2712.     LPWSTR pwszKLID);
  2713. #ifdef UNICODE
  2714. #define GetKeyboardLayoutName  GetKeyboardLayoutNameW
  2715. #else
  2716. #define GetKeyboardLayoutName  GetKeyboardLayoutNameA
  2717. #endif // !UNICODE
  2718.  
  2719.  
  2720. WINUSERAPI
  2721. UINT
  2722. WINAPI
  2723. MapVirtualKeyA(
  2724.     UINT uCode,
  2725.     UINT uMapType);
  2726.  
  2727. WINUSERAPI
  2728. UINT
  2729. WINAPI
  2730. MapVirtualKeyW(
  2731.     UINT uCode,
  2732.     UINT uMapType);
  2733. #ifdef UNICODE
  2734. #define MapVirtualKey  MapVirtualKeyW
  2735. #else
  2736. #define MapVirtualKey  MapVirtualKeyA
  2737. #endif // !UNICODE
  2738.  
  2739.  
  2740. #define KEYEVENTF_KEYUP       0x0002
  2741. #define KEYEVENTF_SILENT      0x0004
  2742.  
  2743.  
  2744. /*
  2745.  * WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  2746.  */
  2747. #define KF_EXTENDED         0x0100
  2748. #define KF_ALTDOWN          0x2000
  2749. #define KF_REPEAT           0x4000
  2750. #define KF_UP               0x8000
  2751.  
  2752. /*
  2753.  * Virtual Keys, Standard Set
  2754.  */
  2755. #define VK_LBUTTON        0x01
  2756. #define VK_RBUTTON        0x02
  2757. #define VK_CANCEL         0x03
  2758. #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
  2759.  
  2760. #define VK_BACK           0x08
  2761. #define VK_TAB            0x09
  2762.  
  2763. #define VK_CLEAR          0x0C
  2764. #define VK_RETURN         0x0D
  2765.  
  2766. #define VK_SHIFT          0x10
  2767. #define VK_CONTROL        0x11
  2768. #define VK_MENU           0x12
  2769. #define VK_PAUSE          0x13
  2770. #define VK_CAPITAL        0x14
  2771.  
  2772. #define    VK_KANA          0x15
  2773. #define    VK_KANJI      0x19
  2774.  
  2775. #define VK_ESCAPE         0x1B
  2776.  
  2777. #define    VK_CONVERT         0x1c
  2778. #define    VK_NOCONVERT      0x1d
  2779.  
  2780. #define VK_SPACE          0x20
  2781. #define VK_PRIOR          0x21
  2782. #define VK_NEXT           0x22
  2783. #define VK_END            0x23
  2784. #define VK_HOME           0x24
  2785. #define VK_LEFT           0x25
  2786. #define VK_UP             0x26
  2787. #define VK_RIGHT          0x27
  2788. #define VK_DOWN           0x28
  2789. #define VK_SELECT         0x29
  2790. #define VK_PRINT          0x2A
  2791. #define VK_EXECUTE        0x2B
  2792. #define VK_SNAPSHOT       0x2C
  2793. #define VK_INSERT         0x2D
  2794. #define VK_DELETE         0x2E
  2795. #define VK_HELP           0x2F
  2796.  
  2797. /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
  2798. /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
  2799.  
  2800. #define VK_LWIN           0x5B
  2801. #define VK_RWIN           0x5C
  2802. #define VK_APPS           0x5D
  2803.  
  2804. #define VK_NUMPAD0        0x60
  2805. #define VK_NUMPAD1        0x61
  2806. #define VK_NUMPAD2        0x62
  2807. #define VK_NUMPAD3        0x63
  2808. #define VK_NUMPAD4        0x64
  2809. #define VK_NUMPAD5        0x65
  2810. #define VK_NUMPAD6        0x66
  2811. #define VK_NUMPAD7        0x67
  2812. #define VK_NUMPAD8        0x68
  2813. #define VK_NUMPAD9        0x69
  2814. #define VK_MULTIPLY       0x6A
  2815. #define VK_ADD            0x6B
  2816. #define VK_SEPARATOR      0x6C
  2817. #define VK_SUBTRACT       0x6D
  2818. #define VK_DECIMAL        0x6E
  2819. #define VK_DIVIDE         0x6F
  2820. #define VK_F1             0x70
  2821. #define VK_F2             0x71
  2822. #define VK_F3             0x72
  2823. #define VK_F4             0x73
  2824. #define VK_F5             0x74
  2825. #define VK_F6             0x75
  2826. #define VK_F7             0x76
  2827. #define VK_F8             0x77
  2828. #define VK_F9             0x78
  2829. #define VK_F10            0x79
  2830. #define VK_F11            0x7A
  2831. #define VK_F12            0x7B
  2832. #define VK_F13            0x7C
  2833. #define VK_F14            0x7D
  2834. #define VK_F15            0x7E
  2835. #define VK_F16            0x7F
  2836. #define VK_F17            0x80
  2837. #define VK_F18            0x81
  2838. #define VK_F19            0x82
  2839. #define VK_F20            0x83
  2840. #define VK_F21            0x84
  2841. #define VK_F22            0x85
  2842. #define VK_F23            0x86
  2843. #define VK_F24            0x87
  2844.  
  2845. #define VK_NUMLOCK        0x90
  2846. #define VK_SCROLL         0x91
  2847.  
  2848. /*
  2849.  * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  2850.  * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  2851.  * No other API or message will distinguish left and right keys in this way.
  2852.  */
  2853. #define VK_LSHIFT         0xA0
  2854. #define VK_RSHIFT         0xA1
  2855. #define VK_LCONTROL       0xA2
  2856. #define VK_RCONTROL       0xA3
  2857. #define VK_LMENU          0xA4
  2858. #define VK_RMENU          0xA5
  2859.  
  2860. #define    VK_EXTEND_BSLASH  0xE2
  2861. #define    VK_OEM_102        0xE2
  2862.  
  2863. #define VK_PROCESSKEY     0xE5
  2864.  
  2865. #define VK_ATTN           0xF6
  2866. #define VK_CRSEL          0xF7
  2867. #define VK_EXSEL          0xF8
  2868. #define VK_EREOF          0xF9
  2869. #define VK_PLAY           0xFA
  2870. #define VK_ZOOM           0xFB
  2871. #define VK_NONAME         0xFC
  2872. #define VK_PA1            0xFD
  2873. #define VK_OEM_CLEAR      0xFE
  2874.  
  2875.  
  2876. #define VK_SEMICOLON        0xBA
  2877. #define VK_EQUAL            0xBB
  2878. #define VK_COMMA            0xBC
  2879. #define VK_HYPHEN            0xBD
  2880. #define VK_PERIOD            0xBE
  2881. #define VK_SLASH            0xBF
  2882. #define VK_BACKQUOTE        0xC0
  2883.  
  2884. #define VK_LBRACKET            0xDB
  2885. #define VK_BACKSLASH        0xDC
  2886. #define VK_RBRACKET            0xDD
  2887. #define VK_APOSTROPHE        0xDE
  2888. #define VK_OFF              0xDF
  2889.  
  2890.  
  2891.  
  2892. #define VK_DBE_ALPHANUMERIC              0x0f0
  2893. #define VK_DBE_KATAKANA                  0x0f1
  2894. #define VK_DBE_HIRAGANA                  0x0f2
  2895. #define VK_DBE_SBCSCHAR                  0x0f3
  2896. #define VK_DBE_DBCSCHAR                  0x0f4
  2897. #define VK_DBE_ROMAN                     0x0f5
  2898. #define VK_DBE_NOROMAN                   0x0f6
  2899. #define VK_DBE_ENTERWORDREGISTERMODE     0x0f7
  2900. #define VK_DBE_ENTERIMECONFIGMODE        0x0f8
  2901. #define VK_DBE_FLUSHSTRING               0x0f9
  2902. #define VK_DBE_CODEINPUT                 0x0fa
  2903. #define VK_DBE_NOCODEINPUT               0x0fb
  2904. #define VK_DBE_DETERMINESTRING           0x0fc
  2905. #define VK_DBE_ENTERDLGCONVERSIONMODE    0x0fd
  2906.  
  2907.  
  2908.  
  2909. // @CESYSGEN ENDIF
  2910.  
  2911.  
  2912.  
  2913. // @CESYSGEN IF GWES_STCCTL
  2914. // Static control styles, messages and notifications
  2915. #define SS_LEFT             0x00000000L
  2916. #define SS_CENTER           0x00000001L
  2917. #define SS_RIGHT        0x00000002L
  2918. #define SS_ICON         0x00000003L
  2919. #define SS_LEFTNOWORDWRAP   0x0000000CL
  2920. #define SS_BITMAP           0x0000000EL
  2921. #define SS_NOPREFIX         0x00000080L
  2922. #define SS_CENTERIMAGE      0x00000200L
  2923. #if(WINVER >= 0x0400)
  2924. #define SS_NOTIFY           0x00000100L
  2925. #define STN_CLICKED         0
  2926. #define STN_ENABLE          2
  2927. #define STN_DISABLE         3
  2928. #endif // WINVER >= 0x0400
  2929.  
  2930. #define STM_SETIMAGE        0x0172
  2931. #define STM_GETIMAGE        0x0173
  2932. // @CESYSGEN ENDIF
  2933.  
  2934. // @CESYSGEN IF GWES_BTNCTL
  2935. // Button control styles, messages and notifications
  2936. #define BS_PUSHBUTTON       0x00000000L
  2937. #define BS_DEFPUSHBUTTON    0x00000001L
  2938. #define BS_CHECKBOX         0x00000002L
  2939. #define BS_AUTOCHECKBOX     0x00000003L
  2940. #define BS_RADIOBUTTON      0x00000004L
  2941. #define BS_3STATE           0x00000005L
  2942. #define BS_AUTO3STATE       0x00000006L
  2943. #define BS_GROUPBOX         0x00000007L
  2944. #define BS_AUTORADIOBUTTON  0x00000009L
  2945. #define BS_OWNERDRAW        0x0000000BL
  2946. #define BS_LEFTTEXT         0x00000020L
  2947. #if (WINVER >= 0x0400)
  2948. #define BS_TEXT             0x00000000L
  2949. #define BS_LEFT             0x00000100L
  2950. #define BS_RIGHT            0x00000200L
  2951. #define BS_CENTER           0x00000300L
  2952. #define BS_TOP              0x00000400L
  2953. #define BS_BOTTOM           0x00000800L
  2954. #define BS_VCENTER          0x00000C00L
  2955. #define BS_PUSHLIKE         0x00001000L
  2956. #define BS_MULTILINE        0x00002000L
  2957. #define BS_NOTIFY           0x00004000L
  2958. #define BS_RIGHTBUTTON      BS_LEFTTEXT
  2959. #endif // WINVER >= 0x0400
  2960.  
  2961. #define BN_CLICKED          0
  2962. #define BN_PAINT            1
  2963. #define BN_HILITE           2
  2964. #define BN_UNHILITE         3
  2965. #define BN_DISABLE          4
  2966. #define BN_DOUBLECLICKED    5
  2967. #if (WINVER >= 0x0400)
  2968. #define BN_PUSHED           BN_HILITE
  2969. #define BN_UNPUSHED         BN_UNHILITE
  2970. #define BN_DBLCLK           BN_DOUBLECLICKED
  2971. #define BN_SETFOCUS         6
  2972. #define BN_KILLFOCUS        7
  2973. #endif // WINVER >= 0x0400
  2974.  
  2975. #define BM_GETCHECK         0x00F0
  2976. #define BM_SETCHECK         0x00F1
  2977. #define BM_GETSTATE         0x00F2
  2978. #define BM_SETSTATE         0x00F3
  2979. #define BM_SETSTYLE         0x00F4
  2980. #if (WINVER >= 0x0400)
  2981. #define BM_CLICK            0x00F5
  2982.  
  2983. #define BST_UNCHECKED       0x0000
  2984. #define BST_CHECKED         0x0001
  2985. #define BST_INDETERMINATE   0x0002
  2986. #define BST_PUSHED          0x0004
  2987. #define BST_FOCUS           0x0008
  2988. #endif // WINVER >= 0x0400
  2989. // @CESYSGEN ENDIF
  2990.  
  2991. #define SW_SCROLLCHILDREN   0x0001  /* Scroll children within *lprcScroll. */
  2992. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  2993. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  2994.  
  2995.  
  2996. #if(WINVER >= 0x0400)
  2997. typedef struct tagNMHDR
  2998. {
  2999.     HWND  hwndFrom;
  3000.     UINT  idFrom;
  3001.     UINT  code;         // NM_ code
  3002. }   NMHDR;
  3003. typedef NMHDR FAR * LPNMHDR;
  3004. #endif
  3005.  
  3006. /*
  3007.  *  Owner draw control types
  3008.  */
  3009. // @CESYSGEN IF GWES_MENU
  3010. #define ODT_MENU        1
  3011. // @CESYSGEN ENDIF
  3012. #define ODT_LISTBOX     2
  3013. #define ODT_COMBOBOX    3
  3014. #define ODT_BUTTON      4
  3015.  
  3016. /*
  3017.  *  Owner draw actions
  3018.  */
  3019. #define ODA_DRAWENTIRE  0x0001
  3020. #define ODA_SELECT      0x0002
  3021. #define ODA_FOCUS       0x0004
  3022.  
  3023. /*
  3024.  *  Owner draw state
  3025.  */
  3026. #define ODS_SELECTED    0x0001
  3027. #define ODS_GRAYED      0x0002
  3028. #define ODS_DISABLED    0x0004
  3029. #define ODS_CHECKED     0x0008
  3030. #define ODS_FOCUS       0x0010
  3031.  
  3032. /*
  3033.  * MEASUREITEMSTRUCT for ownerdraw
  3034.  */
  3035. typedef struct tagMEASUREITEMSTRUCT {
  3036.     UINT    CtlType;
  3037.     UINT    CtlID;
  3038.     UINT    itemID;
  3039.     UINT    itemWidth;
  3040.     UINT    itemHeight;
  3041.     UINT    itemData;
  3042. } MEASUREITEMSTRUCT, *PMEASUREITEMSTRUCT, *LPMEASUREITEMSTRUCT;
  3043.  
  3044. /*
  3045.  *  DRAWITEMSTRUCT for ownerdraw
  3046.  */
  3047. typedef struct tagDRAWITEMSTRUCT {
  3048.     UINT    CtlType;
  3049.     UINT    CtlID;
  3050.     UINT    itemID;
  3051.     UINT    itemAction;
  3052.     UINT    itemState;
  3053.     HWND    hwndItem;
  3054.     HDC     hDC;
  3055.     RECT    rcItem;
  3056.     DWORD   itemData;
  3057. } DRAWITEMSTRUCT, *PDRAWITEMSTRUCT, *LPDRAWITEMSTRUCT;
  3058.  
  3059. /*
  3060.  * DELETITEMSTRUCT for ownerdraw
  3061.  */
  3062. typedef struct tagDELETITEMSTRUCT {
  3063.     UINT    CtlType;
  3064.     UINT    CtlID;
  3065.     UINT    itemID;
  3066.     HWND    hwndItem;
  3067.     UINT    itemData;
  3068. } DELETEITEMSTRUCT, *PDELETEITEMSTRUCT, *LPDELETEITEMSTRUCT;
  3069.  
  3070. typedef struct tagCOMPAREITEMSTRUCT {
  3071.     UINT    CtlType;
  3072.     UINT    CtlID;
  3073.     HWND    hwndItem;
  3074.     UINT    itemID1;
  3075.     DWORD   itemData1;
  3076.     UINT    itemID2;
  3077.     DWORD   itemData2;
  3078.     DWORD   dwLocaleId;
  3079. } COMPAREITEMSTRUCT, *PCOMPAREITEMSTRUCT, *LPCOMPAREITEMSTRUCT;
  3080.  
  3081.  
  3082. // @CESYSGEN IF GWES_EDCTL
  3083. /*
  3084.  *  Edit Control Styles
  3085.  */
  3086. #define ES_LEFT         0x0000L
  3087. #define ES_CENTER       0x0001L
  3088. #define ES_RIGHT        0x0002L
  3089. #define ES_MULTILINE    0x0004L
  3090. #define ES_UPPERCASE    0x0008L
  3091. #define ES_LOWERCASE    0x0010L
  3092. #define ES_PASSWORD     0x0020L
  3093. #define ES_AUTOVSCROLL  0x0040L
  3094. #define ES_AUTOHSCROLL  0x0080L
  3095. #define ES_NOHIDESEL    0x0100L
  3096. #define ES_COMBOBOX     0x0200L
  3097. #define ES_OEMCONVERT   0x0400L
  3098. #define ES_READONLY     0x0800L
  3099. #define ES_WANTRETURN   0x1000L
  3100. #if(WINVER >= 0x0400)
  3101. #define ES_NUMBER           0x2000L
  3102. #endif /* WINVER >= 0x0400 */
  3103.  
  3104. /*
  3105.  *  Edit control notifications
  3106.  */
  3107. #define EN_SETFOCUS     0x0100
  3108. #define EN_KILLFOCUS    0x0200
  3109. #define EN_CHANGE       0x0300
  3110. #define EN_UPDATE       0x0400
  3111. #define EN_ERRSPACE     0x0500
  3112. #define EN_MAXTEXT      0x0501
  3113. #define EN_HSCROLL      0x0601
  3114. #define EN_VSCROLL      0x0602
  3115.  
  3116. #if(WINVER >= 0x0400)
  3117. /* Edit control EM_SETMARGIN parameters */
  3118. #define EC_LEFTMARGIN       0x0001
  3119. #define EC_RIGHTMARGIN      0x0002
  3120. #define EC_USEFONTINFO      0xffff
  3121. #endif /* WINVER >= 0x0400 */
  3122.  
  3123. /*
  3124.  *  Edit Control Messages
  3125.  */
  3126. #define EM_GETSEL               0x00B0
  3127. #define EM_SETSEL               0x00B1
  3128. #define EM_GETRECT              0x00B2
  3129. #define EM_SETRECT              0x00B3
  3130. #define EM_SETRECTNP            0x00B4
  3131. #define EM_SCROLL               0x00B5
  3132. #define EM_LINESCROLL           0x00B6
  3133. #define EM_SCROLLCARET          0x00B7
  3134. #define EM_GETMODIFY            0x00B8
  3135. #define EM_SETMODIFY            0x00B9
  3136. #define EM_GETLINECOUNT         0x00BA
  3137. #define EM_LINEINDEX            0x00BB
  3138. #define EM_LINELENGTH           0x00C1
  3139. #define EM_REPLACESEL           0x00C2
  3140. #define EM_GETLINE              0x00C4
  3141. #define EM_LIMITTEXT            0x00C5
  3142. #define EM_CANUNDO              0x00C6
  3143. #define EM_UNDO                 0x00C7
  3144. #define EM_FMTLINES             0x00C8
  3145. #define EM_LINEFROMCHAR         0x00C9
  3146. #define EM_SETTABSTOPS          0x00CB
  3147. #define EM_SETPASSWORDCHAR      0x00CC
  3148. #define EM_EMPTYUNDOBUFFER      0x00CD
  3149. #define EM_GETFIRSTVISIBLELINE  0x00CE
  3150. #define EM_SETREADONLY          0x00CF
  3151. #define EM_GETPASSWORDCHAR      0x00D2
  3152. #if(WINVER >= 0x0400)
  3153. #define EM_SETMARGINS           0x00D3
  3154. #define EM_GETMARGINS           0x00D4
  3155. #define EM_SETLIMITTEXT         EM_LIMITTEXT   /* ;win40 Name change */
  3156. #define EM_GETLIMITTEXT         0x00D5
  3157. #define EM_POSFROMCHAR          0x00D6
  3158. #define EM_CHARFROMPOS          0x00D7
  3159. #endif /* WINVER >= 0x0400 */
  3160. // @CESYSGEN ENDIF
  3161.  
  3162.  
  3163. // @CESYSGEN IF GWES_SBCMN
  3164. /*
  3165.  * Scroll Bar Constants
  3166.  */
  3167. #define SB_HORZ             0
  3168. #define SB_VERT             1
  3169. #define SB_CTL              2
  3170. #define SB_BOTH             3
  3171.  
  3172.  
  3173. /*
  3174.  * Scroll Bar Commands
  3175.  */
  3176. #define SB_LINEUP           0
  3177. #define SB_LINELEFT         0
  3178. #define SB_LINEDOWN         1
  3179. #define SB_LINERIGHT        1
  3180. #define SB_PAGEUP           2
  3181. #define SB_PAGELEFT         2
  3182. #define SB_PAGEDOWN         3
  3183. #define SB_PAGERIGHT        3
  3184. #define SB_THUMBPOSITION    4
  3185. #define SB_THUMBTRACK       5
  3186. #define SB_TOP              6
  3187. #define SB_LEFT             6
  3188. #define SB_BOTTOM           7
  3189. #define SB_RIGHT            7
  3190. #define SB_ENDSCROLL        8
  3191.  
  3192.  
  3193. /*
  3194.  * Scroll bar messages
  3195.  */
  3196.  
  3197. #define SBM_SETSCROLLINFO           0x00E9
  3198. #define SBM_GETSCROLLINFO           0x00EA
  3199.  
  3200. #define SIF_RANGE           0x0001
  3201. #define SIF_PAGE            0x0002
  3202. #define SIF_POS             0x0004
  3203. #define SIF_DISABLENOSCROLL 0x0008
  3204. #define SIF_TRACKPOS        0x0010
  3205. #define SIF_ALL             (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  3206.  
  3207. typedef struct tagSCROLLINFO
  3208. {
  3209.     UINT    cbSize;
  3210.     UINT    fMask;
  3211.     int     nMin;
  3212.     int     nMax;
  3213.     UINT    nPage;
  3214.     int     nPos;
  3215.     int     nTrackPos;
  3216. }   SCROLLINFO, FAR *LPSCROLLINFO;
  3217. typedef SCROLLINFO CONST FAR *LPCSCROLLINFO;
  3218.  
  3219. WINUSERAPI
  3220. int
  3221. WINAPI
  3222. SetScrollInfo(
  3223.     HWND,
  3224.     int,
  3225.     LPCSCROLLINFO,
  3226.     BOOL);
  3227.  
  3228.  
  3229. WINUSERAPI
  3230. BOOL
  3231. WINAPI
  3232. GetScrollInfo(
  3233.     HWND,
  3234.     int,
  3235.     LPSCROLLINFO
  3236.     );
  3237.  
  3238.  
  3239. int
  3240. WINAPI
  3241. SetScrollPos(
  3242.     HWND    hwnd,
  3243.     int        fnBar,
  3244.     int        nPos,
  3245.     BOOL    bRedraw
  3246.     );
  3247.  
  3248.  
  3249. BOOL
  3250. WINAPI
  3251. SetScrollRange(
  3252. HWND hwnd,
  3253.     int        fnBar,
  3254.     int        nMinPos,
  3255.     int        nMaxPos,
  3256.     BOOL    bRedraw
  3257.     );
  3258.  
  3259. /*
  3260.  * Scroll Bar Styles
  3261.  */
  3262. #define SBS_HORZ                    0x0000L
  3263. #define SBS_VERT                    0x0001L
  3264.  
  3265.  
  3266. // @CESYSGEN ENDIF
  3267.  
  3268.  
  3269.  
  3270.  
  3271. // @CESYSGEN IF GWES_SCBCTL
  3272.  
  3273.  
  3274.  
  3275.  
  3276. // @CESYSGEN ENDIF
  3277.  
  3278. #ifndef NOKEYSTATES
  3279. /*
  3280.  * Key State Masks for Mouse Messages
  3281.  */
  3282. #define MK_LBUTTON          0x0001
  3283. #define MK_RBUTTON          0x0002
  3284. #define MK_SHIFT            0x0004
  3285. #define MK_CONTROL          0x0008
  3286. #define MK_MBUTTON          0x0010
  3287.  
  3288. #endif /* !NOKEYSTATES */
  3289.  
  3290. // @CESYSGEN IF GWES_DLGMGR
  3291. /*
  3292.  *  Dialog Stuff
  3293.  */
  3294. #ifndef NOCTLMGR
  3295.  
  3296. /*
  3297.  * WARNING:
  3298.  * The following structures must NOT be DWORD padded because they are
  3299.  * followed by strings, etc that do not have to be DWORD aligned.
  3300.  */
  3301. #include "pshpack2.h"
  3302.  
  3303. /*
  3304.  * Dialog Box Command IDs
  3305.  */
  3306. #define IDOK                1
  3307. #define IDCANCEL            2
  3308. #define IDABORT             3
  3309. #define IDRETRY             4
  3310. #define IDIGNORE            5
  3311. #define IDYES               6
  3312. #define IDNO                7
  3313. #if(WINVER >= 0x0400)
  3314. #define IDCLOSE         8
  3315. #define IDHELP          9
  3316. #endif /* WINVER >= 0x0400 */
  3317.  
  3318. /*
  3319.  * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  3320.  */
  3321. #define DWL_MSGRESULT   0
  3322. #define DWL_DLGPROC     4
  3323. #define DWL_USER        8
  3324.  
  3325. /*
  3326.  * original NT 32 bit dialog template:
  3327.  */
  3328. typedef struct {
  3329.     DWORD style;
  3330.     DWORD dwExtendedStyle;
  3331.     WORD cdit;
  3332.     short x;
  3333.     short y;
  3334.     short cx;
  3335.     short cy;
  3336. } DLGTEMPLATE;
  3337. typedef DLGTEMPLATE *LPDLGTEMPLATEA;
  3338. typedef DLGTEMPLATE *LPDLGTEMPLATEW;
  3339. #ifdef UNICODE
  3340. typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
  3341. #else
  3342. typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
  3343. #endif // UNICODE
  3344. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
  3345. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
  3346. #ifdef UNICODE
  3347. typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
  3348. #else
  3349. typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
  3350. #endif // UNICODE
  3351.  
  3352. /*
  3353.  * 32 bit Dialog item template.
  3354.  */
  3355. typedef struct {
  3356.     DWORD style;
  3357.     DWORD dwExtendedStyle;
  3358.     short x;
  3359.     short y;
  3360.     short cx;
  3361.     short cy;
  3362.     WORD id;
  3363. } DLGITEMTEMPLATE;
  3364. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
  3365. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
  3366. #ifdef UNICODE
  3367. typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
  3368. #else
  3369. typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
  3370. #endif // UNICODE
  3371. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
  3372. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
  3373. #ifdef UNICODE
  3374. typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
  3375. #else
  3376. typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
  3377. #endif // UNICODE
  3378.  
  3379. #include "poppack.h" /* Resume normal packing */
  3380.  
  3381. /*
  3382.  * Dialog Styles
  3383.  */
  3384. #define DS_ABSALIGN         0x01L
  3385. #define DS_SYSMODAL         0x02L
  3386. #define DS_LOCALEDIT        0x20L   /* Edit items get Local storage. */
  3387. #define DS_SETFONT          0x40L   /* User specified font for Dlg controls */
  3388. #define DS_MODALFRAME       0x80L   /* Can be combined with WS_CAPTION  */
  3389. #define DS_NOIDLEMSG        0x100L  /* WM_ENTERIDLE message will not be sent */
  3390. #define DS_SETFOREGROUND    0x200L  /* not in win3.1 */
  3391.  
  3392. #if(WINVER >= 0x0400)
  3393. #define DS_3DLOOK           0x0004L
  3394. #define DS_FIXEDSYS         0x0008L
  3395. #define DS_NOFAILCREATE     0x0010L
  3396. #define DS_CONTROL          0x0400L
  3397. #define DS_CENTER           0x0800L
  3398. #define DS_CENTERMOUSE      0x1000L
  3399. #define DS_CONTEXTHELP      0x2000L
  3400. #define DS_NOCLOSEBTN        0x4000L
  3401.  
  3402. #endif /* WINVER >= 0x0400 */
  3403.  
  3404. #define DM_GETDEFID         (WM_USER+0)
  3405. #define DM_SETDEFID         (WM_USER+1)
  3406.  
  3407.  
  3408. /*
  3409.  * Returned in HIWORD() of DM_GETDEFID result if msg is supported
  3410.  */
  3411. #define DC_HASDEFID         0x534B
  3412.  
  3413. #define DLGC_WANTARROWS         0x0001
  3414. #define DLGC_WANTTAB            0x0002
  3415. #define DLGC_WANTALLKEYS        0x0004
  3416. #define DLGC_WANTMESSAGE        0x0004
  3417. #define DLGC_HASSETSEL          0x0008
  3418. #define DLGC_DEFPUSHBUTTON      0x0010
  3419. #define DLGC_UNDEFPUSHBUTTON    0x0020
  3420. #define DLGC_RADIOBUTTON        0x0040
  3421. #define DLGC_WANTCHARS          0x0080
  3422. #define DLGC_STATIC             0x0100
  3423. #define DLGC_BUTTON             0x2000
  3424.  
  3425.  
  3426. // @CESYSGEN IF GWES_LBCTL
  3427. /*
  3428.  * Listbox Return Values
  3429.  */
  3430. #define LB_OKAY             0
  3431. #define LB_ERR              (-1)
  3432. #define LB_ERRSPACE         (-2)
  3433.  
  3434. /*
  3435. **  The idStaticPath parameter to DlgDirList can have the following values
  3436. **  ORed if the list box should show other details of the files along with
  3437. **  the name of the files;
  3438. */
  3439.                                   /* all other details also will be returned */
  3440.  
  3441. /*
  3442.  * Listbox Notification Codes
  3443.  */
  3444. #define LBN_ERRSPACE        (-2)
  3445. #define LBN_SELCHANGE       1
  3446. #define LBN_DBLCLK          2
  3447. #define LBN_SELCANCEL       3
  3448. #define LBN_SETFOCUS        4
  3449. #define LBN_KILLFOCUS       5
  3450.  
  3451. #ifndef NOWINMESSAGES
  3452.  
  3453. /*
  3454.  * Listbox messages
  3455.  */
  3456. #define LB_ADDSTRING            0x0180
  3457. #define LB_INSERTSTRING         0x0181
  3458. #define LB_DELETESTRING         0x0182
  3459. #define LB_SELITEMRANGEEX       0x0183
  3460. #define LB_RESETCONTENT         0x0184
  3461. #define LB_SETSEL               0x0185
  3462. #define LB_SETCURSEL            0x0186
  3463. #define LB_GETSEL               0x0187
  3464. #define LB_GETCURSEL            0x0188
  3465. #define LB_GETTEXT              0x0189
  3466. #define LB_GETTEXTLEN           0x018A
  3467. #define LB_GETCOUNT             0x018B
  3468. #define LB_SELECTSTRING         0x018C
  3469. #define LB_GETTOPINDEX          0x018E
  3470. #define LB_FINDSTRING           0x018F
  3471. #define LB_GETSELCOUNT          0x0190
  3472. #define LB_GETSELITEMS          0x0191
  3473. #define LB_SETTABSTOPS          0x0192
  3474. #define LB_GETHORIZONTALEXTENT  0x0193
  3475. #define LB_SETHORIZONTALEXTENT  0x0194
  3476. #define LB_SETCOLUMNWIDTH       0x0195
  3477. #define LB_SETTOPINDEX          0x0197
  3478. #define LB_GETITEMRECT          0x0198
  3479. #define LB_GETITEMDATA          0x0199
  3480. #define LB_SETITEMDATA          0x019A
  3481. #define LB_SELITEMRANGE         0x019B
  3482. #define LB_SETANCHORINDEX       0x019C
  3483. #define LB_GETANCHORINDEX       0x019D
  3484. #define LB_SETCARETINDEX        0x019E
  3485. #define LB_GETCARETINDEX        0x019F
  3486. #define LB_SETITEMHEIGHT        0x01A0
  3487. #define LB_GETITEMHEIGHT        0x01A1
  3488. #define LB_FINDSTRINGEXACT      0x01A2
  3489. #define LB_SETLOCALE            0x01A5
  3490. #define LB_GETLOCALE            0x01A6
  3491. #if(WINVER >= 0x0400)
  3492. #define LB_INITSTORAGE          0x01A8
  3493. #define LB_ITEMFROMPOINT        0x01A9
  3494. #endif /* WINVER >= 0x0400 */
  3495. #if(WINVER >= 0x0400)
  3496. #define LB_MSGMAX               0x01B1
  3497. #else
  3498. #define LB_MSGMAX               0x01A8
  3499. #endif
  3500.  
  3501. #endif /* !NOWINMESSAGES */
  3502.  
  3503. /*
  3504.  * Listbox Styles
  3505.  */
  3506. #define LBS_NOTIFY            0x0001L
  3507. #define LBS_SORT              0x0002L
  3508. #define LBS_NOREDRAW          0x0004L
  3509. #define LBS_MULTIPLESEL       0x0008L
  3510. #define LBS_HASSTRINGS        0x0040L
  3511. #define LBS_USETABSTOPS       0x0080L
  3512. #define LBS_NOINTEGRALHEIGHT  0x0100L
  3513. #define LBS_MULTICOLUMN       0x0200L
  3514. #define LBS_WANTKEYBOARDINPUT 0x0400L
  3515. #define LBS_EXTENDEDSEL       0x0800L
  3516. #define LBS_DISABLENOSCROLL   0x1000L
  3517. #define LBS_NODATA            0x2000L
  3518. #if(WINVER >= 0x0400)
  3519. #define LBS_NOSEL             0x4000L
  3520. #endif /* WINVER >= 0x0400 */
  3521. #define LBS_STANDARD          (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  3522.  
  3523. // Extended styles
  3524. #define LBS_EX_CONSTSTRINGDATA   0x00000002L
  3525. // @CESYSGEN ENDIF
  3526.  
  3527.  
  3528. // @CESYSGEN IF GWES_CMBCTL
  3529. /*
  3530.  * Combo Box return Values
  3531.  */
  3532. #define CB_OKAY             0
  3533. #define CB_ERR              (-1)
  3534. #define CB_ERRSPACE         (-2)
  3535.  
  3536. /*
  3537.  * Combo Box Notification Codes
  3538.  */
  3539. #define CBN_ERRSPACE        (-1)
  3540. #define CBN_SELCHANGE       1
  3541. #define CBN_DBLCLK          2
  3542. #define CBN_SETFOCUS        3
  3543. #define CBN_KILLFOCUS       4
  3544. #define CBN_EDITCHANGE      5
  3545. #define CBN_EDITUPDATE      6
  3546. #define CBN_DROPDOWN        7
  3547. #define CBN_CLOSEUP         8
  3548. #define CBN_SELENDOK        9
  3549. #define CBN_SELENDCANCEL    10
  3550.  
  3551. /*
  3552.  * Combo Box styles
  3553.  */
  3554. #define CBS_DROPDOWN          0x0002L
  3555. #define CBS_DROPDOWNLIST      0x0003L
  3556. #define CBS_AUTOHSCROLL       0x0040L
  3557. #define CBS_OEMCONVERT        0x0080L
  3558. #define CBS_SORT              0x0100L
  3559. #define CBS_HASSTRINGS        0x0200L
  3560. #define CBS_NOINTEGRALHEIGHT  0x0400L
  3561. #define CBS_DISABLENOSCROLL   0x0800L
  3562. #if(WINVER >= 0x0400)
  3563. #define CBS_UPPERCASE           0x2000L
  3564. #define CBS_LOWERCASE           0x4000L
  3565. #endif /* WINVER >= 0x0400 */
  3566.  
  3567. // Extended combo box styles
  3568. #define CBS_EX_CONSTSTRINGDATA  0x00000002L
  3569.  
  3570. /*
  3571.  * Combo Box messages
  3572.  */
  3573. #define CB_GETEDITSEL               0x0140
  3574. #define CB_LIMITTEXT                0x0141
  3575. #define CB_SETEDITSEL               0x0142
  3576. #define CB_ADDSTRING                0x0143
  3577. #define CB_DELETESTRING             0x0144
  3578. #define CB_GETCOUNT                 0x0146
  3579. #define CB_GETCURSEL                0x0147
  3580. #define CB_GETLBTEXT                0x0148
  3581. #define CB_GETLBTEXTLEN             0x0149
  3582. #define CB_INSERTSTRING             0x014A
  3583. #define CB_RESETCONTENT             0x014B
  3584. #define CB_FINDSTRING               0x014C
  3585. #define CB_SELECTSTRING             0x014D
  3586. #define CB_SETCURSEL                0x014E
  3587. #define CB_SHOWDROPDOWN             0x014F
  3588. #define CB_GETITEMDATA              0x0150
  3589. #define CB_SETITEMDATA              0x0151
  3590. #define CB_GETDROPPEDCONTROLRECT    0x0152
  3591. #define CB_SETITEMHEIGHT            0x0153
  3592. #define CB_GETITEMHEIGHT            0x0154
  3593. #define CB_SETEXTENDEDUI            0x0155
  3594. #define CB_GETEXTENDEDUI            0x0156
  3595. #define CB_GETDROPPEDSTATE          0x0157
  3596. #define CB_FINDSTRINGEXACT          0x0158
  3597. #define CB_SETLOCALE                0x0159
  3598. #define CB_GETLOCALE                0x015A
  3599. #if(WINVER >= 0x0400)
  3600. #define CB_GETTOPINDEX              0x015b
  3601. #define CB_SETTOPINDEX              0x015c
  3602. #define CB_GETHORIZONTALEXTENT      0x015d
  3603. #define CB_SETHORIZONTALEXTENT      0x015e
  3604. #define CB_GETDROPPEDWIDTH          0x015f
  3605. #define CB_SETDROPPEDWIDTH          0x0160
  3606. #define CB_INITSTORAGE              0x0161
  3607. #endif /* WINVER >= 0x0400 */
  3608. #if(WINVER >= 0x0400)
  3609. #define CB_MSGMAX                   0x0163
  3610. #else
  3611. #define CB_MSGMAX                   0x015B
  3612. #endif
  3613. // @CESYSGEN ENDIF
  3614.  
  3615.  
  3616.  
  3617.  
  3618. WINUSERAPI
  3619. BOOL
  3620. WINAPI
  3621. IsDialogMessageA(
  3622.     HWND hDlg,
  3623.     LPMSG lpMsg);
  3624.  
  3625. WINUSERAPI
  3626. BOOL
  3627. WINAPI
  3628. IsDialogMessageW(
  3629.     HWND hDlg,
  3630.     LPMSG lpMsg);
  3631.  
  3632. #ifdef UNICODE
  3633. #define IsDialogMessage  IsDialogMessageW
  3634. #else
  3635. #define IsDialogMessage  IsDialogMessageA
  3636. #endif // !UNICODE
  3637.  
  3638. WINUSERAPI
  3639. HWND
  3640. WINAPI
  3641. CreateDialogIndirectParamA(
  3642.     HINSTANCE hInstance,
  3643.     LPCDLGTEMPLATEA lpTemplate,
  3644.     HWND hWndParent,
  3645.     DLGPROC lpDialogFunc,
  3646.     LPARAM dwInitParam);
  3647. WINUSERAPI
  3648. HWND
  3649. WINAPI
  3650. CreateDialogIndirectParamW(
  3651.     HINSTANCE hInstance,
  3652.     LPCDLGTEMPLATEW lpTemplate,
  3653.     HWND hWndParent,
  3654.     DLGPROC lpDialogFunc,
  3655.     LPARAM dwInitParam);
  3656. #ifdef UNICODE
  3657. #define CreateDialogIndirectParam  CreateDialogIndirectParamW
  3658. #else
  3659. #define CreateDialogIndirectParam  CreateDialogIndirectParamA
  3660. #endif // !UNICODE
  3661.  
  3662.  
  3663. /*
  3664.     @func HWND | CreateDialogIndirect | Creates a modeless dialog box from a dialog box
  3665.     template resource.
  3666.     @parm HINSTANCE | hInstance | handle of application instance
  3667.     @parm LPCDLGTEMPLATE | lpTemplate | Ptr to laoded dialog box template resource
  3668.     @parm HWND | hwndOwner | handle of owner window
  3669.     @parm DLGPROC | lpDialogFunc | address of dialog box procedure
  3670.     @rdesc returns the window handle for the created dialog
  3671.     @comm Implemented as a macro in terms of <f CreateDialogIndirectParam>
  3672. */
  3673. #define CreateDialogIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3674.     CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3675. #define CreateDialogIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3676.     CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3677. #ifdef UNICODE
  3678. #define CreateDialogIndirect  CreateDialogIndirectW
  3679. #else
  3680. #define CreateDialogIndirect  CreateDialogIndirectA
  3681. #endif // !UNICODE
  3682.  
  3683. /*
  3684.     @func HWND | CreateDialogParam | Creates a modeless dialog box from a dialog box
  3685.     resource ID.
  3686.     @parm HINSTANCE | hInstance | handle of application instance
  3687.     @parm LPSTR | lpTemplateName | Ptr to dialog box resource name
  3688.     @parm HWND | hwndOwner | handle of owner window
  3689.     @parm DLGPROC | lpDialogFunc | address of dialog box procedure
  3690.     @parm LPARAM | dwInitParam | Initialization parameter
  3691.     @rdesc returns the window handle for the created dialog
  3692.     @comm Implemented as a macro in terms of <f CreateDialogIndirectParam>
  3693. */
  3694. #define CreateDialogParamA(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3695.     CreateDialogIndirectParamA(hInstance,   \
  3696.         (LPCDLGTEMPLATEA)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3697.         hwndOwner, lpfnDialog, lParam)
  3698. #define CreateDialogParamW(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3699.     CreateDialogIndirectParamW(hInstance,   \
  3700.         (LPCDLGTEMPLATEW)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3701.         hwndOwner, lpfnDialog, lParam)
  3702. #ifdef UNICODE
  3703. #define CreateDialogParam  CreateDialogParamW
  3704. #else
  3705. #define CreateDialogParam  CreateDialogParamA
  3706. #endif // !UNICODE
  3707.  
  3708. /*
  3709.     @func HWND | CreateDialog | Creates a modeless dialog box from a dialog box
  3710.     resource ID.
  3711.     @parm HINSTANCE | hInstance | handle of application instance
  3712.     @parm LPSTR | lpTemplateName | Ptr to dialog box resource name
  3713.     @parm HWND | hwndOwner | handle of owner window
  3714.     @parm DLGPROC | lpDialogFunc | address of dialog box procedure
  3715.     @rdesc returns the window handle for the created dialog
  3716.     @comm Implemented as a macro in terms of <f CreateDialogIndirectParam>
  3717. */
  3718. #define CreateDialogA(hInstance, lpName, hWndParent, lpDialogFunc) \
  3719.     CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3720. #define CreateDialogW(hInstance, lpName, hWndParent, lpDialogFunc) \
  3721.     CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3722. #ifdef UNICODE
  3723. #define CreateDialog  CreateDialogW
  3724. #else
  3725. #define CreateDialog  CreateDialogA
  3726. #endif // !UNICODE
  3727.  
  3728. int
  3729. WINAPI
  3730. DialogBoxIndirectParamA(
  3731.     HINSTANCE hInstance,
  3732.     LPCDLGTEMPLATEA hDialogTemplate,
  3733.     HWND hWndParent ,
  3734.     DLGPROC lpDialogFunc,
  3735.     LPARAM dwInitParam);
  3736. int
  3737. WINAPI
  3738. DialogBoxIndirectParamW(
  3739.     HINSTANCE hInstance,
  3740.     LPCDLGTEMPLATEW hDialogTemplate,
  3741.     HWND hWndParent ,
  3742.     DLGPROC lpDialogFunc,
  3743.     LPARAM dwInitParam);
  3744. #ifdef UNICODE
  3745. #define DialogBoxIndirectParam  DialogBoxIndirectParamW
  3746. #else
  3747. #define DialogBoxIndirectParam  DialogBoxIndirectParamA
  3748. #endif // !UNICODE
  3749.  
  3750. /*
  3751.     @func int | DialogBoxIndirect | Creates a modal dialog box from a dialog box
  3752.     template resource.
  3753.     @parm HINSTANCE | hInstance | handle of application instance
  3754.     @parm LPCDLGTEMPLATE | lpTemplate | identifies loaded dialog box template resource
  3755.     @parm HWND | hwndParent | handle of owner window
  3756.     @parm DLGPROC | lpDialogFunc | address of dialog box procedure
  3757.     @comm Implemented as a macro in terms of <f DialogBoxIndirectParam>
  3758. */
  3759. #define DialogBoxIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3760.     DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3761. #define DialogBoxIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3762.     DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3763. #ifdef UNICODE
  3764. #define DialogBoxIndirect  DialogBoxIndirectW
  3765. #else
  3766. #define DialogBoxIndirect  DialogBoxIndirectA
  3767. #endif // !UNICODE
  3768.  
  3769. /*
  3770.     @func int | DialogBoxParam | Creates a modal dialog box from a dialog box
  3771.     template resource.
  3772.     @parm HINSTANCE | hInstance | handle of application instance
  3773.     @parm LPCTSTR | lpTemplateName | identifies dialog box template
  3774.     @parm HWND | hwndParent | handle of owner window
  3775.     @parm DLGPROC | lpDialogFunc | address of dialog box procedure
  3776.     @parm LPARAM | dwInitParam | initialization value
  3777.     @comm Implemented as a macro in terms of <f DialogBoxIndirectParam>
  3778. */
  3779. #define DialogBoxParamA(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3780.     DialogBoxIndirectParamA(hInstance,   \
  3781.         (LPCDLGTEMPLATEA)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3782.         hwndOwner, lpfnDialog, lParam)
  3783. #define DialogBoxParamW(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3784.     DialogBoxIndirectParamW(hInstance,   \
  3785.         (LPCDLGTEMPLATEW)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3786.         hwndOwner, lpfnDialog, lParam)
  3787. #ifdef UNICODE
  3788. #define DialogBoxParam  DialogBoxParamW
  3789. #else
  3790. #define DialogBoxParam  DialogBoxParamA
  3791. #endif // !UNICODE
  3792.  
  3793. /*
  3794.     @func int | DialogBox | Creates a modal dialog box from a dialog box
  3795.     template resource.
  3796.     @parm HINSTANCE | hInstance | handle of application instance
  3797.     @parm LPCTSTR | lpTemplateName | identifies dialog box template
  3798.     @parm HWND | hwndParent | handle of owner window
  3799.     @parm DLGPROC | lpDialogFunc | address of dialog box procedure
  3800.     @comm Implemented as a macro in terms of <f DialogBoxIndirectParam>
  3801. */
  3802. #define DialogBoxA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3803.     DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3804. #define DialogBoxW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3805.     DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3806. #ifdef UNICODE
  3807. #define DialogBox  DialogBoxW
  3808. #else
  3809. #define DialogBox  DialogBoxA
  3810. #endif // !UNICODE
  3811.  
  3812. BOOL
  3813. WINAPI
  3814. EndDialog(
  3815.     HWND hDlg,
  3816.     int nResult);
  3817.  
  3818. HWND
  3819. WINAPI
  3820. GetNextDlgGroupItem (
  3821.     HWND hDlg,
  3822.     HWND hCtl,
  3823.     BOOL bPrevious
  3824.     );
  3825.  
  3826. HWND
  3827. WINAPI
  3828. GetNextDlgTabItem (
  3829.     HWND hDlg,
  3830.     HWND hCtl,
  3831.     BOOL bPrevious
  3832.     );
  3833.  
  3834. int
  3835. WINAPI
  3836. GetDlgCtrlID (
  3837.     HWND hWnd
  3838.     );
  3839.  
  3840. long
  3841. WINAPI
  3842. GetDialogBaseUnits(
  3843.     VOID
  3844.     );
  3845.  
  3846. BOOL
  3847. WINAPI
  3848. MapDialogRect (
  3849.     HWND hwnd,
  3850.     LPRECT prc
  3851.     );
  3852.  
  3853.  
  3854. HWND
  3855. WINAPI
  3856. GetDlgItem (
  3857.     HWND hDlg,
  3858.     int  iCtrlID
  3859.     );
  3860.  
  3861. WINUSERAPI
  3862. LRESULT
  3863. WINAPI
  3864. DefDlgProcA(
  3865.     HWND hDlg,
  3866.     UINT Msg,
  3867.     WPARAM wParam,
  3868.     LPARAM lParam);
  3869. WINUSERAPI
  3870. LRESULT
  3871. WINAPI
  3872. DefDlgProcW(
  3873.     HWND hDlg,
  3874.     UINT Msg,
  3875.     WPARAM wParam,
  3876.     LPARAM lParam);
  3877. #ifdef UNICODE
  3878. #define DefDlgProc  DefDlgProcW
  3879. #else
  3880. #define DefDlgProc  DefDlgProcA
  3881. #endif // !UNICODE
  3882.  
  3883.  
  3884. /*
  3885.  * Window extra bytes needed for private dialog classes.
  3886.  */
  3887. #define DLGWINDOWEXTRA 32
  3888.  
  3889. WINUSERAPI
  3890. BOOL
  3891. WINAPI
  3892. SetDlgItemInt(
  3893.     HWND hDlg,
  3894.     int nIDDlgItem,
  3895.     UINT uValue,
  3896.     BOOL bSigned);
  3897.  
  3898. WINUSERAPI
  3899. UINT
  3900. WINAPI
  3901. GetDlgItemInt(
  3902.     HWND hDlg,
  3903.     int nIDDlgItem,
  3904.     BOOL *lpTranslated,
  3905.     BOOL bSigned);
  3906.  
  3907. BOOL
  3908. WINAPI
  3909. CheckRadioButton(
  3910.     HWND hDlg,
  3911.     int nIDFirstButton,
  3912.     int nIDLastButton,
  3913.     int nIDCheckButton);
  3914.  
  3915. WINUSERAPI
  3916. LONG
  3917. WINAPI
  3918. SendDlgItemMessageA(
  3919.     HWND hDlg,
  3920.     int nIDDlgItem,
  3921.     UINT Msg,
  3922.     WPARAM wParam,
  3923.     LPARAM lParam);
  3924. WINUSERAPI
  3925. LONG
  3926. WINAPI
  3927. SendDlgItemMessageW(
  3928.     HWND hDlg,
  3929.     int nIDDlgItem,
  3930.     UINT Msg,
  3931.     WPARAM wParam,
  3932.     LPARAM lParam);
  3933. #ifdef UNICODE
  3934. #define SendDlgItemMessage  SendDlgItemMessageW
  3935. #else
  3936. #define SendDlgItemMessage  SendDlgItemMessageA
  3937. #endif // !UNICODE
  3938.  
  3939. WINUSERAPI
  3940. BOOL
  3941. WINAPI
  3942. SetDlgItemTextA(
  3943.     HWND hDlg,
  3944.     int nIDDlgItem,
  3945.     LPCSTR lpString);
  3946. WINUSERAPI
  3947. BOOL
  3948. WINAPI
  3949. SetDlgItemTextW(
  3950.     HWND hDlg,
  3951.     int nIDDlgItem,
  3952.     LPCWSTR lpString);
  3953. #ifdef UNICODE
  3954. #define SetDlgItemText  SetDlgItemTextW
  3955. #else
  3956. #define SetDlgItemText  SetDlgItemTextA
  3957. #endif // !UNICODE
  3958.  
  3959. WINUSERAPI
  3960. UINT
  3961. WINAPI
  3962. GetDlgItemTextA(
  3963.     HWND hDlg,
  3964.     int nIDDlgItem,
  3965.     LPSTR lpString,
  3966.     int nMaxCount);
  3967. WINUSERAPI
  3968. UINT
  3969. WINAPI
  3970. GetDlgItemTextW(
  3971.     HWND hDlg,
  3972.     int nIDDlgItem,
  3973.     LPWSTR lpString,
  3974.     int nMaxCount);
  3975. #ifdef UNICODE
  3976. #define GetDlgItemText  GetDlgItemTextW
  3977. #else
  3978. #define GetDlgItemText  GetDlgItemTextA
  3979. #endif // !UNICODE
  3980. /*
  3981. @func BOOL | SendDlgItemMessage | Sends a dlg item a message
  3982. @parm HWND | hwndDlg | Dialog handle
  3983. @parm int | idControl | id of control to send msg to
  3984. @parm WPARAM | wparam  | wParam of message
  3985. @parm LPARAM | lParam | lParam of message
  3986. @comm implemented as macro in terms of <f GetDlgItem> and <f SendMessage>
  3987. */
  3988. /*
  3989. @func BOOL | SetDlgItemText | Sets text of a dlg item
  3990. @parm HWND | hwndDlg | Dialog handle
  3991. @parm int | idControl | id of control to send msg to
  3992. @parm LPSTR | lpsz  | Ptr to text to be set
  3993. @comm implemented as macro in terms of <f GetDlgItem> and <f SetWindowText>
  3994. */
  3995. /*
  3996. @func BOOL | GetDlgItemText | Gets text of a dlg item
  3997. @parm HWND | hwndDlg | Dialog handle
  3998. @parm int | idControl | id of control to send msg to
  3999. @parm LPSTR | lpsz  | Ptr to text buffer
  4000. @parm int | nMaxCount | size of buffer
  4001. @comm implemented as macro in terms of <f GetDlgItem> and <f GetWindowText>
  4002. */
  4003.  
  4004. #endif // !NOCTLMGR
  4005. // @CESYSGEN ENDIF GWES_DLGMGR
  4006.  
  4007.  
  4008.  
  4009. /*
  4010.  * Clipboard Manager Functions
  4011.  */
  4012.  
  4013. // @CESYSGEN IF GWES_CLIPBD
  4014. WINUSERAPI
  4015. BOOL
  4016. WINAPI
  4017. OpenClipboard(
  4018.     HWND hWndNewOwner);
  4019.  
  4020. WINUSERAPI
  4021. BOOL
  4022. WINAPI
  4023. CloseClipboard(
  4024.     VOID);
  4025.  
  4026. WINUSERAPI
  4027. HWND
  4028. WINAPI
  4029. GetClipboardOwner(
  4030.     VOID);
  4031.  
  4032. WINUSERAPI
  4033. HANDLE
  4034. WINAPI
  4035. SetClipboardData(
  4036.     UINT uFormat,
  4037.     HANDLE hMem);
  4038.  
  4039. WINUSERAPI
  4040. HANDLE
  4041. WINAPI
  4042.     GetClipboardData(
  4043.     UINT uFormat);
  4044.  
  4045. WINUSERAPI
  4046. HANDLE
  4047. WINAPI
  4048.     GetClipboardDataAlloc(
  4049.     UINT uFormat);
  4050.  
  4051.  
  4052. #ifndef UNICODE_ONLY
  4053. WINUSERAPI
  4054. UINT
  4055. WINAPI
  4056. RegisterClipboardFormatA(
  4057.     LPCSTR lpszFormat);
  4058. #endif //!UNICODE_ONLY
  4059. #ifndef ANSI_ONLY
  4060. WINUSERAPI
  4061. UINT
  4062. WINAPI
  4063. RegisterClipboardFormatW(
  4064.     LPCWSTR lpszFormat);
  4065. #endif //!ANSI_ONLY
  4066. #ifdef UNICODE
  4067. #define RegisterClipboardFormat  RegisterClipboardFormatW
  4068. #else
  4069. #define RegisterClipboardFormat  RegisterClipboardFormatA
  4070. #endif // !UNICODE
  4071.  
  4072. WINUSERAPI
  4073. int
  4074. WINAPI
  4075. CountClipboardFormats(
  4076.     VOID);
  4077.  
  4078. WINUSERAPI
  4079. UINT
  4080. WINAPI
  4081. EnumClipboardFormats(
  4082.     UINT format);
  4083.  
  4084. #ifndef UNICODE_ONLY
  4085. WINUSERAPI
  4086. int
  4087. WINAPI
  4088. GetClipboardFormatNameA(
  4089.     UINT format,
  4090.     LPSTR lpszFormatName,
  4091.     int cchMaxCount);
  4092. #endif //!UNICODE_ONLY
  4093. #ifndef ANSI_ONLY
  4094. WINUSERAPI
  4095. int
  4096. WINAPI
  4097. GetClipboardFormatNameW(
  4098.     UINT format,
  4099.     LPWSTR lpszFormatName,
  4100.     int cchMaxCount);
  4101. #endif //!ANSI_ONLY
  4102. #ifdef UNICODE
  4103. #define GetClipboardFormatName  GetClipboardFormatNameW
  4104. #else
  4105. #define GetClipboardFormatName  GetClipboardFormatNameA
  4106. #endif // !UNICODE
  4107.  
  4108. WINUSERAPI
  4109. BOOL
  4110. WINAPI
  4111. EmptyClipboard(
  4112.     VOID);
  4113.  
  4114. WINUSERAPI
  4115. BOOL
  4116. WINAPI
  4117. IsClipboardFormatAvailable(
  4118.     UINT format);
  4119.  
  4120. WINUSERAPI
  4121. int
  4122. WINAPI
  4123. GetPriorityClipboardFormat(
  4124.     UINT *paFormatPriorityList,
  4125.     int cFormats);
  4126.  
  4127. WINUSERAPI
  4128. HWND
  4129. WINAPI
  4130. GetOpenClipboardWindow(
  4131.     VOID);
  4132.  
  4133. // @CESYSGEN ENDIF
  4134.  
  4135. /* 3D Border Styles */
  4136. #define BDR_RAISEDOUTER     0x0001
  4137. #define BDR_SUNKENOUTER     0x0002
  4138. #define BDR_RAISEDINNER     0x0004
  4139. #define BDR_SUNKENINNER     0x0008
  4140.  
  4141. #define BDR_OUTER           0x0003
  4142. #define BDR_INNER           0x000C
  4143. #define BDR_RAISED          0x0005
  4144. #define BDR_SUNKEN          0x000A
  4145.  
  4146. #define EDGE_RAISED         (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  4147. #define EDGE_SUNKEN         (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  4148. #define EDGE_ETCHED         (BDR_SUNKENOUTER | BDR_RAISEDINNER)
  4149. #define EDGE_BUMP           (BDR_RAISEDOUTER | BDR_SUNKENINNER)
  4150.  
  4151. /* Border Flags */
  4152. #define BF_LEFT             0x0001
  4153. #define BF_TOP              0x0002
  4154. #define BF_RIGHT            0x0004
  4155. #define BF_BOTTOM           0x0008
  4156.  
  4157. #define BF_DIAGONAL         0x0010
  4158.  
  4159. #define BF_DIAGONAL_ENDTOPRIGHT     (BF_DIAGONAL | BF_TOP | BF_RIGHT)
  4160. #define BF_DIAGONAL_ENDTOPLEFT      (BF_DIAGONAL | BF_TOP | BF_LEFT)
  4161. #define BF_DIAGONAL_ENDBOTTOMLEFT   (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
  4162. #define BF_DIAGONAL_ENDBOTTOMRIGHT  (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
  4163.  
  4164. #define BF_TOPLEFT          (BF_TOP | BF_LEFT)
  4165. #define BF_TOPRIGHT         (BF_TOP | BF_RIGHT)
  4166. #define BF_BOTTOMLEFT       (BF_BOTTOM | BF_LEFT)
  4167. #define BF_BOTTOMRIGHT      (BF_BOTTOM | BF_RIGHT)
  4168. #define BF_RECT             (BF_LEFT | BF_RIGHT | BF_TOP | BF_BOTTOM)
  4169.  
  4170. #define BF_MIDDLE           0x0800
  4171.  
  4172. #define BF_SOFT             0x1000
  4173. #define BF_ADJUST           0x2000
  4174. #define BF_FLAT             0x4000
  4175. #define BF_MONO             0x8000
  4176.  
  4177.  
  4178. /*
  4179.  *  Color Types
  4180.  */
  4181. #define CTLCOLOR_MSGBOX         0
  4182. #define CTLCOLOR_EDIT           1
  4183. #define CTLCOLOR_LISTBOX        2
  4184. #define CTLCOLOR_BTN            3
  4185. #define CTLCOLOR_SCOLLBAR       5
  4186. #define CTLCOLOR_STATIC         6
  4187. #define CTLCOLOR_MAX            7
  4188.  
  4189.  
  4190.  
  4191. // @CESYSGEN IF GWES_CURSOR || GWES_MCURSOR
  4192.  
  4193. HCURSOR
  4194. WINAPI
  4195. SetCursor(
  4196.     HCURSOR hCursor);
  4197.  
  4198.  
  4199. #ifdef UNDER_NT
  4200.  
  4201. #ifndef UNICODE_ONLY
  4202. WINUSERAPI
  4203. HCURSOR
  4204. WINAPI
  4205. LoadCursorA(
  4206.     HINSTANCE hInstance,
  4207.     LPCSTR lpCursorName);
  4208. #endif //!UNICODE_ONLY
  4209. #ifndef ANSI_ONLY
  4210. WINUSERAPI
  4211. HCURSOR
  4212. WINAPI
  4213. LoadCursorW(
  4214.     HINSTANCE hInstance,
  4215.     LPCWSTR lpCursorName);
  4216. #endif //!ANSI_ONLY
  4217. #ifdef UNICODE
  4218. #define LoadCursor  LoadCursorW
  4219. #else
  4220. #define LoadCursor  LoadCursorA
  4221. #endif // !UNICODE
  4222.  
  4223. #define IDC_ARROW           MAKEINTRESOURCE(32512) // Arrow cursor for emulation
  4224.  
  4225. #else // UNDER_NT
  4226.  
  4227. WINUSERAPI
  4228. HCURSOR
  4229. WINAPI
  4230. LoadCursorA(
  4231.     HINSTANCE hInstance,
  4232.     LPCSTR lpCursorName);
  4233. WINUSERAPI
  4234. HCURSOR
  4235. WINAPI
  4236. LoadCursorW(
  4237.     HINSTANCE hInstance,
  4238.     LPCWSTR lpCursorName);
  4239. #undef LoadCursor
  4240. #ifdef UNICODE
  4241. #define LoadCursor  LoadCursorW
  4242. #else
  4243. #define LoadCursor  LoadCursorA
  4244. #endif // !UNICODE
  4245.  
  4246.  
  4247. #endif // UNDER_NT
  4248.  
  4249. /*
  4250.  * Standard Cursor IDs
  4251.  */
  4252. #define IDC_ARROW           MAKEINTRESOURCE(32512)
  4253. #define IDC_IBEAM           MAKEINTRESOURCE(32513)
  4254. #define IDC_WAIT            MAKEINTRESOURCE(32514)
  4255. #define IDC_CROSS           MAKEINTRESOURCE(32515)
  4256. #define IDC_UPARROW         MAKEINTRESOURCE(32516)
  4257. #define IDC_SIZE            MAKEINTRESOURCE(32646)
  4258. #define IDC_ICON            MAKEINTRESOURCE(32512)
  4259. #define IDC_SIZENWSE        MAKEINTRESOURCE(32642)
  4260. #define IDC_SIZENESW        MAKEINTRESOURCE(32643)
  4261. #define IDC_SIZEWE          MAKEINTRESOURCE(32644)
  4262. #define IDC_SIZENS          MAKEINTRESOURCE(32645)
  4263. #define IDC_SIZEALL         MAKEINTRESOURCE(32646)
  4264. #define IDC_NO              MAKEINTRESOURCE(32648)
  4265. #define IDC_APPSTARTING     MAKEINTRESOURCE(32650)
  4266. #define IDC_HELP            MAKEINTRESOURCE(32651)
  4267. #define IDC_HAND            MAKEINTRESOURCE(32649)
  4268.  
  4269. WINUSERAPI
  4270. int
  4271. WINAPI
  4272. ShowCursor(
  4273.     BOOL bShow);
  4274.  
  4275. WINUSERAPI
  4276. BOOL
  4277. WINAPI
  4278. SetCursorPos(
  4279.     int X,
  4280.     int Y);
  4281.  
  4282. WINUSERAPI
  4283. HCURSOR
  4284. WINAPI
  4285. SetCursor(
  4286.     HCURSOR hCursor);
  4287.  
  4288. WINUSERAPI
  4289. BOOL
  4290. WINAPI
  4291. GetCursorPos(
  4292.     LPPOINT lpPoint);
  4293.  
  4294. WINUSERAPI
  4295. BOOL
  4296. WINAPI
  4297. ClipCursor(
  4298.     CONST RECT *lpRect);
  4299.  
  4300. WINUSERAPI
  4301. BOOL
  4302. WINAPI
  4303. GetClipCursor(
  4304.     LPRECT lpRect);
  4305.  
  4306. WINUSERAPI
  4307. HCURSOR
  4308. WINAPI
  4309. GetCursor(
  4310.     VOID);
  4311.  
  4312. // @CESYSGEN ENDIF
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323. // @CESYSGEN IF GWES_TIMER
  4324. UINT WINAPI SetTimer(
  4325.     HWND hwnd,
  4326.     UINT idTimer,
  4327.     UINT uTimeOut,
  4328.     TIMERPROC pfnTimerProc);
  4329.  
  4330. BOOL WINAPI KillTimer(
  4331.     HWND hwnd,
  4332.     UINT idEvent);
  4333. // @CESYSGEN ENDIF
  4334.  
  4335.  
  4336. // @CESYSGEN IF GWES_KBDUI
  4337. DWORD
  4338. WINAPI
  4339. GetKeyboardStatus(
  4340.     VOID
  4341.     );
  4342.  
  4343. BOOL
  4344. WINAPI
  4345. EnableHardwareKeyboard(
  4346.     BOOL    fEnable
  4347.     );
  4348.  
  4349.  
  4350.  
  4351. // @CESYSGEN IF GWES_HOTKEY
  4352. #define WM_HOTKEY                        0x0312
  4353.  
  4354. #define MOD_ALT         0x0001
  4355. #define MOD_CONTROL     0x0002
  4356. #define MOD_SHIFT       0x0004
  4357. #define MOD_WIN         0x0008
  4358. #define MOD_KEYUP        0x1000
  4359.  
  4360.  
  4361. #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
  4362. #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
  4363.  
  4364.  
  4365. WINUSERAPI
  4366. BOOL
  4367. WINAPI
  4368. RegisterHotKey(
  4369.     HWND    hWnd,
  4370.     int        id,
  4371.     UINT    fsModifiers,
  4372.     UINT    vk
  4373.     );
  4374.  
  4375. WINUSERAPI
  4376. BOOL
  4377. WINAPI
  4378. UnregisterHotKey(
  4379.     HWND    hWnd,
  4380.     int        id
  4381.     );
  4382.  
  4383. // @CESYSGEN ENDIF
  4384.  
  4385.  
  4386.  
  4387. // @CESYSGEN ENDIF
  4388.  
  4389.  
  4390. #define SPIF_UPDATEINIFILE    0x0001
  4391. #define SPIF_SENDCHANGE        0x0002
  4392.  
  4393. // @CESYSGEN IF GWES_CURSOR || GWES_MCURSOR
  4394. #define SPI_GETMOUSE                3
  4395. #define SPI_SETMOUSE                4
  4396. // @CESYSGEN ENDIF
  4397.  
  4398.  
  4399. #define SPI_SETWORKAREA            47
  4400. #define SPI_GETWORKAREA            48
  4401.  
  4402.  
  4403. // @CESYSGEN IF GWES_IDLE
  4404. #define SPI_SETBATTERYIDLETIMEOUT    251
  4405. #define SPI_GETBATTERYIDLETIMEOUT    252
  4406.  
  4407. #define SPI_SETEXTERNALIDLETIMEOUT    253
  4408. #define SPI_GETEXTERNALIDLETIMEOUT    254
  4409.  
  4410. #define SPI_SETWAKEUPIDLETIMEOUT    255
  4411. #define SPI_GETWAKEUPIDLETIMEOUT    256
  4412.  
  4413. // @CESYSGEN ENDIF
  4414.  
  4415.  
  4416.  
  4417.  
  4418. #define SPI_GETPLATFORMTYPE 257
  4419. #define SPI_GETOEMINFO 258
  4420.  
  4421. WINUSERAPI
  4422. BOOL
  4423. WINAPI
  4424. SystemParametersInfoA(
  4425.     UINT uiAction,
  4426.     UINT uiParam,
  4427.     PVOID pvParam,
  4428.     UINT fWinIni);
  4429.  
  4430. WINUSERAPI
  4431. BOOL
  4432. WINAPI
  4433. SystemParametersInfoW(
  4434.     UINT uiAction,
  4435.     UINT uiParam,
  4436.     PVOID pvParam,
  4437.     UINT fWinIni);
  4438. #ifdef UNICODE
  4439. #define SystemParametersInfo  SystemParametersInfoW
  4440. #else
  4441. #define SystemParametersInfo  SystemParametersInfoA
  4442. #endif // !UNICODE
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480. // @CESYSGEN IF GWES_ICONCMN
  4481. #define WM_GETICON                      0x007F
  4482. #define WM_SETICON                      0x0080
  4483.  
  4484. // WM_SETICON / WM_GETICON Type Codes
  4485. #define ICON_SMALL          0
  4486. #define ICON_BIG            1
  4487.  
  4488. // @CESYSGEN ENDIF
  4489.  
  4490.  
  4491. // @CESYSGEN IF GWES_ICON
  4492.  
  4493. HICON
  4494. WINAPI
  4495. LoadIconA(
  4496.     HINSTANCE hInstance,
  4497.     LPCSTR lpIconName);
  4498.  
  4499. HICON
  4500. WINAPI
  4501. LoadIconW(
  4502.     HINSTANCE hInstance,
  4503.     LPCWSTR lpIconName);
  4504. #ifdef UNICODE
  4505. #define LoadIcon  LoadIconW
  4506. #else
  4507. #define LoadIcon  LoadIconA
  4508. #endif // !UNICODE
  4509.  
  4510.  
  4511. BOOL
  4512. WINAPI
  4513. DestroyIcon(
  4514.     HICON hIcon);
  4515.  
  4516.  
  4517. #define DI_MASK         0x0001
  4518. #define DI_IMAGE        0x0002
  4519. #define DI_NORMAL       0x0003
  4520.  
  4521. BOOL
  4522. WINAPI
  4523. DrawIconEx(
  4524.     HDC hdc,
  4525.     int xLeft,
  4526.     int yTop,
  4527.     HICON hIcon,
  4528.     int cxWidth,
  4529.     int cyWidth,
  4530.     UINT istepIfAniCur,
  4531.     HBRUSH hbrFlickerFreeDraw,
  4532.     UINT diFlags);
  4533.  
  4534. #define DrawIcon(hdc,x,y,hicon) \
  4535.         DrawIconEx(hdc,x,y,hicon,0,0,0,NULL, DI_NORMAL)
  4536.  
  4537.  
  4538.  
  4539. typedef struct _ICONINFO {
  4540.     BOOL    fIcon;
  4541.     DWORD   xHotspot;
  4542.     DWORD   yHotspot;
  4543.     HBITMAP hbmMask;
  4544.     HBITMAP hbmColor;
  4545. } ICONINFO;
  4546. typedef ICONINFO *PICONINFO;
  4547.  
  4548.  
  4549. HICON
  4550. WINAPI
  4551. CreateIconIndirect(
  4552.     PICONINFO piconinfo);
  4553.  
  4554.  
  4555. // @CESYSGEN ENDIF
  4556.  
  4557.  
  4558. // @CESYSGEN IF GWES_LOADIMG
  4559.  
  4560. // @CESYSGEN IF GWES_LOADBMP
  4561. #define IMAGE_BITMAP        0
  4562. // @CESYSGEN ENDIF
  4563.  
  4564. // @CESYSGEN IF GWES_ICONCMN
  4565. #define IMAGE_ICON          1
  4566. #define IMAGE_CURSOR        2
  4567. // @CESYSGEN ENDIF
  4568.  
  4569.  
  4570. #define LR_DEFAULTCOLOR     0x0000
  4571.  
  4572. HANDLE
  4573. WINAPI
  4574. LoadImageA(
  4575.     HINSTANCE,
  4576.     LPCSTR,
  4577.     UINT,
  4578.     int,
  4579.     int,
  4580.     UINT);
  4581.  
  4582. HANDLE
  4583. WINAPI
  4584. LoadImageW(
  4585.     HINSTANCE,
  4586.     LPCWSTR,
  4587.     UINT,
  4588.     int,
  4589.     int,
  4590.     UINT);
  4591. #ifdef UNICODE
  4592. #define LoadImage  LoadImageW
  4593. #else
  4594. #define LoadImage  LoadImageA
  4595. #endif // !UNICODE
  4596. // @CESYSGEN ENDIF
  4597.  
  4598.  
  4599. // @CESYSGEN IF GWES_ICONCURS
  4600. // @CESYSGEN ENDIF
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606. #ifdef __cplusplus
  4607. }
  4608. #endif /*__cplusplus*/
  4609.  
  4610.  
  4611. #ifdef WINCEOEM
  4612. #include <pwinuser.h>    // internal defines
  4613. #ifdef WINCEMACRO
  4614. #include <mwinuser.h>
  4615. #endif
  4616. #endif
  4617.  
  4618.  
  4619. #endif /* _WINUSER_ */
  4620.